home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / mail / YamNet.lha / YamNet < prev    next >
Text File  |  1996-12-31  |  85KB  |  2,998 lines

  1. /* YamNet Rewritted (almost)
  2.  
  3.     $VER: YamNet 3.07 by Alfredo Soro (31 Dic 1996 - 04:00)
  4.  
  5. */
  6.  
  7. if ~show('l','rexxsupport.library')
  8. then do
  9.  call addlib('rexxsupport.library',0,-30)
  10. end
  11. if ~show('l','rexxtricks.library')
  12. then do
  13.  call addlib('rexxtricks.library',0,-30)
  14. end
  15. if ~show('l','rexxtricks.library')
  16. then do
  17.  Say 'Rexxtricks.library??  -- VERSION: 38.6+'
  18.  EXIT
  19. END
  20.  
  21. if ~show('l','rexxextra.library')
  22. then do
  23.  call addlib('rexxextra.library',0,-30)
  24. END
  25.  
  26.  
  27. IF ~show(l,"rexxreqtools.library") THEN IF ~addlib("rexxreqtools.library", 0, -30, 0)
  28. then do
  29.  Call Textos('#' , 'rexxreqtools.library no encontrada en LIBS:' , 'rexxreqtools.library not found in LIBS:')
  30.  EXIT 10
  31. end
  32.  
  33. options failat 99
  34. options cache
  35. OPTIONS RESULTS
  36. SIGNAL ON BREAK_C
  37. SIGNAL ON BREAK_D
  38. SIGNAL ON BREAK_E
  39. SIGNAL ON BREAK_F
  40. SIGNAL ON HALT
  41. SIGNAL OFF SYNTAX
  42. SIGNAL OFF ERROR
  43. SIGNAL OFF NOVALUE
  44. call time 'r'
  45.  
  46. /* trace results */
  47.  
  48. Say ''
  49. Say ' YamNet v3.07 - by Alfredo Soro - 31 Dic 1996 - 04:00 '
  50.  
  51. NL = d2c(10)
  52. atra = d2c(8)
  53. lin = NL
  54. remanda = 0
  55. reborra = 65532
  56. yamcheck = 0
  57. rehoy = date('b')
  58. safe = 0
  59. elrre = 0
  60. borros = 0
  61. quienes = ''
  62. deteta = 0
  63. PURGE = 0
  64. FUERA = 0
  65. purgy = 0
  66. nogui = 0
  67. NOHIDE = 0
  68. LANG = ''
  69. LOGFIL = ''
  70. LOGLEV = ''
  71. INBO = ''
  72. OUTBO = ''
  73. TEMP = ''
  74. LANG = ''
  75. ZONAS = 0
  76. NODOS = 0
  77. DROP UUMOD.
  78. DROP TOPGP.
  79. DROP ELNO.
  80. DROP LADRE.
  81. DROP SUBZ.
  82. DROP SUBJ.
  83. DROP SUBNO.
  84. DROP LLAMADA.
  85. DROP recinu.
  86.  
  87. if ~exists('c:fscode')
  88. then do
  89.  Say 'c:FSCode ???'
  90.  EXIT
  91. end
  92.  
  93. if ~exists('c:base64encode')
  94. then do
  95.  Say 'c:Base64Encode ???'
  96.  EXIT
  97. end
  98.  
  99. if ~exists('c:base64decode')
  100. then do
  101.  Say 'c:Base64Decode ???'
  102.  EXIT
  103. end
  104.  
  105. if ~exists('s:YamNet.cfg')
  106. then do
  107.  Say 'S:YamNet.cfg?'
  108.  Call PREFS
  109.  Call LOGFPREFS
  110.  CALL YQPREFS
  111.  CALL INPREFS
  112.  CALL OUTPREFS
  113.  CALL LOGLPREFS
  114.  CALL NODPREFS
  115.  CALL MODPREFS
  116.  CALL SNODPREFS
  117.  CALL ONLYFLOPREFS
  118.  CALL TEMPPREFS
  119.  CALL NOHIDEPREFS
  120.  CALL YAMCHECKPREFS
  121.  CALL PURGEPREFS
  122.  CALL GRABACFG
  123. end
  124.  
  125. LEEPREFS:
  126.  
  127. Call open('YNCFG','S:YamNet.cfg','R')
  128. cambiadas = 0
  129.  
  130. Do until EOF('YNCFG')
  131.  
  132.  lectura = readln('YNCFG')
  133.  pasa = 0
  134.  
  135.  if left(lectura,1) = ';' then pasa = 1
  136.  
  137.  if pasa = 0 & upper(word(lectura,1)) = 'LANG'
  138.  then do
  139.   pasa = 1
  140.   LANG = UPPER(right(lectura,length(lectura)-7))
  141.   if LANG ~= 'ESPAÑOL' & LANG ~= 'ENGLISH'
  142.   then do
  143.    cambiadas = cambiadas + 1
  144.    LLAMADA = 'LENPREFS'
  145.   end
  146.  end
  147.  
  148.  if pasa = 0 & UPPER(Left(lectura,6)) = 'LOG = '
  149.  then do
  150.   pasa = 1
  151.   LOGFIL = right(lectura,length(lectura)-6)
  152.   pazlo = ''
  153.   pospaz = ''
  154.   do clo = 1 to length(logfil)
  155.    pazlo = pazlo || right(left(logfil,clo),1)
  156.    if right(left(logfil,clo),1) = ':' then pospaz = pazlo
  157.    if right(left(logfil,clo),1) = '/' then pospaz = pazlo
  158.   end
  159.   if pospaz ~= '' & ~exists(pospaz) then pospaz = ''
  160.   if pospaz = ''
  161.   then do
  162.    cambiadas = cambiadas + 1
  163.    LLAMADA = 'LOGFPREFS'
  164.   end
  165.  end
  166.  
  167.  if pasa = 0 & UPPER(Left(lectura,7)) = 'TEMP = '
  168.  then do
  169.   TEMP = RIGHT(lectura,length(lectura)-7)
  170.   TEm = TEMP'/'
  171.   if right(TEMP,1) = ':' then TEm = TEMP
  172.   if right(TEMP,1) = '/' then TEm = TEMP
  173.   TEMP = TEm
  174.   pasa = 1
  175.   if ~exists(TEMP)
  176.   then do
  177.    cambiadas = cambiadas + 1
  178.    LLAMADA.cambiadas = 'TEMPPREFS'
  179.   end
  180.  end
  181.  
  182.  if pasa = 0 & UPPER(Left(lectura,11)) = 'LOGLEVEL = '
  183.  then do
  184.   pasa = 1
  185.   LOGLEV = subword(lectura,3,1)
  186.   if LOGLEV = '0' then LOGLEV = 0
  187.   if LOGLEV = '1' then LOGLEV = 1
  188.   if LOGLEV = '2' then LOGLEV = 2
  189.   if LOGLEV = '3' then LOGLEV = 3
  190.   if LOGLEV = '4' then LOGLEV = 4
  191.   if loglev ~= 0 & loglev ~= 1 & loglev ~= 2 & loglev ~= 3 & loglev ~= 4
  192.   then do
  193.    cambiadas = cambiadas + 1
  194.    LLAMADA = 'LOGLPREFS'
  195.   end
  196.  end
  197.  
  198.  if pasa = 0 & UPPER(Left(lectura,6)) = 'NOHIDE'
  199.  then do
  200.   NOHIDE = 1
  201.  end
  202.  
  203.  if pasa = 0 & UPPER(Left(lectura,11)) = 'OUTBOUND = '
  204.  then do
  205.   OUTBO = right(lectura,length(lectura)-11)
  206.   outb = OUTBO'/'
  207.   if right(OUTBO,1) = ':' then outb = OUTBO
  208.   if right(OUTBO,1) = '/' then outb = OUTBO
  209.   OUTBO = outb
  210.   pasa = 1
  211.   if ~exists(outbo)
  212.   then do
  213.    cambiadas = cambiadas + 1
  214.    LLAMADA.cambiadas = 'OUTPREFS'
  215.   end
  216.  end
  217.  
  218.  if pasa = 0 & ONLYFLO ~= 1 then ONLYFLO = 0
  219.  if pasa = 0 & UPPER(Left(lectura,7)) = 'ONLYFLO'
  220.  then do
  221.   ONLYFLO = 1
  222.   pasa = 1
  223.  end
  224.  
  225.  if pasa = 0 & UPPER(Left(lectura,10)) = 'INBOUND = '
  226.  then do
  227.   INBO = right(lectura,length(lectura)-10)
  228.   INb = INBO'/'
  229.   if right(INBO,1) = ':' then INb = INBO
  230.   if right(INBO,1) = '/' then INb = INBO
  231.   INBO = INb
  232.   pasa = 1
  233.   if ~exists(inbo)
  234.   then do
  235.    cambiadas = cambiadas + 1
  236.    LLAMADA.cambiadas = 'INPREFS'
  237.   end
  238.  end
  239.  
  240.  if pasa = 0 & upper(left(lectura,8)) = 'YAMCHECK'
  241.  Then do
  242.   YamCheck = 1
  243.   pasa = 1
  244.  end
  245.  
  246.  if pasa = 0 & upper(left(lectura,5)) = 'PURGE'
  247.  Then do
  248.   PURGY = 1
  249.   pasa = 1
  250.  end
  251.  
  252.  if pasa = 0 & upper(left(lectura,9))= 'RESEND = '
  253.  then do
  254.   pasa = 1
  255.   remanda = word(lectura,3)
  256.   if ~datatype(remanda,'N')
  257.   then do
  258.    cambiadas = cambiadas + 1
  259.    LLAMADA.cambiadas = 'REMAPREFS'
  260.   end
  261.  end
  262.  
  263.  if pasa = 0 & upper(left(lectura,9))= 'DELETE = '
  264.  then do
  265.   pasa = 1
  266.   reborra = word(lectura,3)
  267.   if ~datatype(reborra,'N')
  268.   then do
  269.    cambiadas = cambiadas + 1
  270.    LLAMADA.cambiadas = 'REBOPREFS'
  271.   end
  272.  end
  273.  
  274.  if pasa = 0 & upper(left(lectura,10))= 'SUBZONA = '
  275.  then do
  276.   pasa = 1
  277.   zonas = zonas + 1
  278.   SUBZ.zonas = SUBWORD(lectura,3,1)
  279.   SUBJ.zonas = SUBWORD(lectura,4,1)
  280.  end
  281.  
  282.  if pasa = 0 & upper(left(lectura,7))= 'NODO = '
  283.  then do
  284.   nodos = nodos + 1
  285.   ELNO.nodos = SUBWORD(lectura,3,1)
  286.   ELNODO.nodos = SUBWORD(lectura,3,1)
  287.   LADRE.nodos = SUBWORD(lectura,4,1)
  288.   UUMOD.nodos = SUBWORD(lectura,5,1)
  289.   if upper(UUMOD.nodos) = 'PGP' then TOPGP.nodos = RIGHT(lectura,(length(lectura)-1)-length(subword(lectura,1,5)))
  290.   if upper(UUMOD.nodos) ~= 'PGP' & upper(UUMOD.nodos) ~= 'FSCODE' & upper(UUMOD.nodos) ~= 'UUIN' & upper(UUMOD.nodos) ~= 'MIME' then CALL PMODPREFS
  291.  end
  292. end
  293.  
  294. IF LANG = ''
  295. then do
  296.  cambiadas = cambiadas + 1
  297.  LLAMADA.cambiadas = 'LENPREFS'
  298. end
  299.  
  300. IF LOGFIL = ''
  301. then do
  302.  cambiadas = cambiadas + 1
  303.  LLAMADA.cambiadas = 'LOGFPREFS'
  304. end
  305.  
  306. IF LOGLEV = ''
  307. then do
  308.  cambiadas = cambiadas + 1
  309.  LLAMADA.cambiadas = 'LOGLPREFS'
  310. end
  311.  
  312. IF INBO = ''
  313. then do
  314.  cambiadas = cambiadas + 1
  315.  LLAMADA.cambiadas = 'INPREFS'
  316. end
  317.  
  318. IF TEMP = ''
  319. then do
  320.  cambiadas = cambiadas + 1
  321.  LLAMADA.cambiadas = 'TEMPPREFS'
  322. end
  323.  
  324. IF OUTBO = ''
  325. then do
  326.  cambiadas = cambiadas + 1
  327.  LLAMADA.cambiadas = 'OUTPREFS'
  328. end
  329.  
  330. if remanda = 0
  331. then do
  332.  cambiadas = cambiadas + 1
  333.  LLAMADA.cambiadas = 'REMAPREFS'
  334. end
  335.  
  336. if reborra = 65532
  337. then do
  338.  cambiadas = cambiadas + 1
  339.  LLAMADA.cambiadas = 'REBOPREFS'
  340. end
  341.  
  342. IF Nodos = 0
  343. then do
  344.  cambiadas = cambiadas + 1
  345.  LLAMADA.cambiadas = 'NODPREFS'
  346. end
  347.  
  348. IF zonas = 0
  349. then do
  350.  if LANG = 'ESPAÑOL' then say '*** SUBZONA: No hay ninguna Zona y Subject definidos en S:YamNet.cfg'
  351.  if LANG = 'ESPAÑOL' then say ' *** Programa interrumpido!!'
  352.  if LANG = 'ENGLISH' then say "*** SUBZONA: There isn't any NetZone & Subject defined in S:YamNet.cfg"
  353.  if LANG = 'ENGLISH' then say ' *** Program aborted!!'
  354.  EXIT
  355. END
  356.  
  357. Call close('YNCFG')
  358.  
  359. if cambiadas ~= 0
  360. then do
  361.  IF LANG = '' then call LENPREFS
  362.  do a = 1 to cambiadas
  363.   if LLAMADA.a = 'LOGFPREFS' then CALL LOGFPREFS
  364.   if LLAMADA.a = 'REMAPREFS' then CALL REMAPREFS
  365.   if LLAMADA.a = 'REBOPREFS' then CALL REBOPREFS
  366.   if LLAMADA.a = 'YQPREFS' then CALL YQPREFS
  367.   if LLAMADA.a = 'INPREFS' then CALL INPREFS
  368.   if LLAMADA.a = 'OUTPREFS' then CALL OUTPREFS
  369.   if LLAMADA.a = 'TEMPPREFS' then CALL TEMPPREFS
  370.   if LLAMADA.a = 'LOGLPREFS' then CALL LOGLPREFS
  371.   if LLAMADA.a = 'PGPPREFS' then CALL PGPPREFS
  372.   if LLAMADA.a = 'NODPREFS' then CALL NODPREFS
  373.  end
  374.  CALL GRABACFG
  375. end
  376.  
  377. do mirs = 1 to nodos
  378.  SUBNO.mirs = ''
  379.  pcone = 0
  380.  zono = ''
  381.  pand = ''
  382.  do until pand = '.'
  383.   pcone = pcone + 1
  384.   pand = Right(Left(ELNO.mirs,pcone),1)
  385.   if pand ~= '.' then zono = zono || pand
  386.  end
  387.  parando = ''
  388.  lasz = 0
  389.  do until parando = 'ya'
  390.   lasz = lasz +1
  391.   lazo = SUBZ.lasz
  392.   if zono = lazo
  393.   THEN DO
  394.    SUBNO.mirs = SUBJ.lasz
  395.    parando = 'ya'
  396.   end
  397.   if lasz = zonas then parando = 'ya'
  398.  end
  399.  
  400.  if SUBNO.mirs = ''
  401.  then do
  402.   if LANG = 'ESPAÑOL' then say '*** SUBZONA: Falta definicion de Zona-Subject para el NODO: '||ELNO.mirs
  403.   if LANG = 'ESPAÑOL' then say ' *** Programa interrumpido!!'
  404.   if LANG = 'ENGLISH' then say '*** SUBZONA: Missing ZONE-SUBJECT definition for Node:'||ELNO.mirs
  405.   if LANG = 'ENGLISH' then say ' *** Program aborted!!'
  406.   EXIT
  407.  end
  408. end
  409.  
  410. /* INICIO */
  411.  
  412. parse arg accion segur congui
  413.  
  414. if upper(accion) = 'GENDAT'
  415. then do
  416.  call GENERADAT
  417.  EXIT
  418. end
  419.  
  420. if upper(accion) = 'GUI' | upper(segur) = 'GUI' | upper(congui) = 'GUI' then nogui = 1
  421. if upper(accion) = 'PURGE' then purge = 1
  422. if upper(accion) = 'OUT' Then fuera = 1
  423. if upper(accion) = 'SAFE' | upper(segur) = 'SAFE' | upper(congui) = 'SAFE' then safe = 1
  424.  
  425. if upper(accion) ~= 'GUI' & upper(accion) ~= 'SAFE' & upper(accion) ~= 'PURGE' & upper(accion) ~= 'OUT' & accion ~= '' then usal = 1
  426. if upper(segur) ~= 'GUI' & upper(segur) ~= 'SAFE' & segur ~= '' then usal = 1
  427. if upper(congui) ~= 'GUI' & upper(congui) ~= 'SAFE' & congui ~= '' then usal = 1
  428. if accion ~= ''
  429. then do
  430.  if upper(accion) = upper(segur) | upper(accion) = upper(congui) then usal = 1
  431. end
  432. if segur ~= '' then if upper(segur) = upper(congui) then usal = 1
  433.  
  434. if usal = 1
  435. then do
  436.  IF Upper(LANG) = 'ESPAÑOL'
  437.  then do
  438.   say 'Usar:        YamNet [PURGE/S|OUT/S] [SAFE/S] [GUI/S]'lin||lin'1-> YamNet'lin' Procesa a INBOUND mensajes RECIBIDOS en YAM de YamNet'lin'Escribe un recibo y borra mensajes enviados al encontrar'lin'un recibo remitido por otro YamNet.'lin||lin' Si recibe un encode estropeado manda un Resend-Request,'
  439.   Say 'y si recibe un mensaje Resend-Request trata de enviar el'lin'mensaje, previamente enviado, de nuevo a su destinatario.'lin||lin'2-> YamNet SAFE'lin'   No borra ficheros tras procesarlos.'lin||lin'3-> YamNet PURGE'
  440.   Say '   Busca unicamente comprobantes ENVIADOS en el YAM y los borra'lin||lin'4-> YamNet OUT'lin'   Traslada (uuencodea) paquetes de correo y (solo copia) ficheros de'lin'OUTBOUND a su destino por YAM.'lin||lin' >> GUI (al final) Permite al usuario elegir las opciones pulsando un boton.'
  441.  end
  442.  IF Upper(LANG) = 'ENGLISH'
  443.  then do
  444.   say 'Usage:        YamNet [PURGE/S|OUT/S] [SAFE/S] [NOGUI/S]'lin||lin'1-> YamNet'lin' It sends to INBOUND files of messages at INCOMING in YAM received from'lin'one YamNet (YamGate or similar) then writes one receipt. And deletes'lin"the sended messages if finds another YamNet's(or similar) receipts."lin||lin'2-> YamNet SAFE'
  445.   say '   It does NOT deletes any files after process it.'lin||lin'3-> YamNet PURGE'lin'   Only search SENT receipts in YAM and delete it'lin||lin'4-> YamNet OUT'lin'   Move (uuencode) mail bundles & files(only copy) from OUTBOUND'lin'  to his destination using YAM.'lin||lin' >> NOGUI (at the end) Says to program do not do questions to user.'
  446.  end
  447.  EXIT
  448. end
  449.  
  450. if purge = 1 & safe = 1
  451. then do
  452.  IF Upper(LANG) = 'ESPAÑOL' then Say 'ERROR: No pueden usarse los argumentos PURGE y SAFE simultaneamente.'
  453.  IF Upper(LANG) = 'ENGLISH' then Say 'ERROR: Cannot be used PURGE & SAFE arguments at same time.'
  454.  EXIT
  455. end
  456.  
  457. if nogui = 1
  458. then do
  459.  address command('run >NIL: <NIL: YNetGUI')
  460.  EXIT
  461. end
  462.  
  463. Call Textos('!' , 'YamNet V3.07 Empezando a procesar' , 'YamNet V3.07 Starting to process')
  464.  
  465. if exists(TEMP'YamNet.SAFE')
  466. then do
  467.  deteta = 1
  468.  Call Textos('#' , 'Fichero ['TEMP'YamNet.SAFE] detectado!','['TEMP'YamNet.SAFE] file detected!')
  469.  Call SubTextos('borralo antes de ejecutar YamNet' , 'Delete it befere running YamNet')
  470.  Call AnteSalir
  471.  EXIT
  472. end
  473.  
  474. IF YAMCHECK = 1
  475. then do
  476.  IF SHOW('Ports','YAM')
  477.  THEN DO
  478.   ELYAM = 'Tareauno'
  479.   Call Tareauno
  480.   TRASTUNO:
  481.  end
  482.  IF ~SHOW('Ports','YAM')
  483.  THEN DO
  484.   Address Command('Run <NIL: >NIL: YAM:YAM')
  485.   Address Command('WaitForPort YAM')
  486.  END
  487.  if exists('env:YamCheck')
  488.  then do
  489.   ELYAM = 'Tareados'
  490.   Call Tareados
  491.   TRASTDOS:
  492.  end
  493. end
  494. IF YAMCHECK = 0
  495. then do
  496.  IF ~SHOW('Ports','YAM')
  497.  THEN DO
  498.   Address Command('Run <NIL: >NIL: YAM:YAM NOCHECK')
  499.   Address Command('WaitForPort YAM')
  500.  END
  501. end
  502.  
  503. ADDRESS YAM
  504.  
  505. if purge = 1
  506. then do
  507.  ELYAM = 'Infierno'
  508.  Call INFIERNO
  509. SIGUINFER:
  510.  Call Borrados
  511.  Exit
  512. end
  513.  
  514. if Fuera = 1
  515. then do
  516.  Call SOLOFUERA
  517.  TRASLO:
  518.  Call Borrados
  519.  EXIT
  520. end
  521. ELYAM = 'Observin'
  522. Call OBSERVIN
  523. TRASOBSER:
  524. If YamCheck = 1
  525. then do
  526.  if exists('env:YamCheck')
  527.  then do
  528.   mailsendall
  529.  
  530.   setfolder 1
  531.   ope = 0
  532.   do until ope = 1
  533.    getfolderinfo MAX
  534.    ele = RESULT
  535.    if ele = 0 then ope = 1
  536.   end
  537.   Call Delete('ENV:YamCheck')
  538.  end
  539. end
  540. if purgy = 1 then Call INFIERNO
  541. if borros = 1 then call borrados
  542. Call AnteSalir
  543. EXIT
  544.  
  545.  Tareauno:
  546.   SIGNAL ON SYNTAX
  547.   mailcheck
  548.   perel = RESULT
  549.   SIGNAL OFF SYNTAX
  550.   if perel = -1
  551.   then do
  552.    call Textos('#' , 'YAMCHECK configurado sin estar conectado!' , 'YAMCHECK is configured with NO connection')
  553.    Call Textos('!' , 'ABORTANDO!!' , 'ABORTING!!')   
  554.    Call AnteSalir
  555.    EXIT
  556.   end
  557.   call delay(100)
  558.  RETURN
  559.  EXIT
  560.  
  561.  Tareados:
  562.   SIGNAL ON SYNTAX
  563.   mailsendall
  564.   SIGNAL OFF SYNTAX
  565.   CALL Delete('ENV:YamCheck')
  566.  RETURN
  567.  EXIT
  568.  
  569. OBSERVIN:
  570.  
  571.  SIGNAL ON SYNTAX
  572.  setfolder 0
  573.  SIGNAL OFF SYNTAX
  574.  GetFolderInfo MAX
  575.  datos = RESULT
  576.  
  577.  Do li=0 to datos-1
  578.   nohacer = 0
  579.   setfolder 0
  580.   SetMail li
  581.   GetMailInfo SUB
  582.   subje = RESULT
  583.   GetMailInfo FRO
  584.   Vienede = RESULT
  585.   lared = ''
  586.   e = 0
  587.   mir = 0
  588.   do until e = 1
  589.    mir = mir + 1
  590.    if word(subje,1) = word(SUBJ.mir,1)
  591.    then do
  592.     lared = subje
  593.     tadon = SUBZ.mir
  594.     e = 1
  595.    end
  596.    if mir = zonas then e = 1
  597.   end
  598.   if lared = ''
  599.   then do
  600.    IF LOGLEV = 1 | LOGLEV = 4
  601.    then do
  602.     IF LANG = 'ESPAÑOL' then say ' - 'date()' 'time()'  Observando e-mail de: 'left(vienede' - 'subje,26)
  603.     IF LANG = 'ENGLISH' then say ' - 'date()' 'time()'  Checking e-mail from: 'left(vienede' - 'subje,26)
  604.    end
  605.    IF LOGLEV = 2 | LOGLEV = 4
  606.    then do
  607.     IF LANG = 'ESPAÑOL' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  Observando e-mail de: 'vienede' - 'subje'"')
  608.     IF LANG = 'ENGLISH' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  Checking e-mail from: 'vienede' - 'subje'"')
  609.    end
  610.   end
  611.   if lared ~= ''
  612.   then do
  613.    IF LOGLEV = 1 | LOGLEV = 4
  614.    then do
  615.     IF LANG = 'ESPAÑOL' then say ' - 'date()' 'time()'  Observando e-mail de: 'vienede' - 'word(subje,1)' 'word(subje,2)' 'subword(subje,3)
  616.     IF LANG = 'ENGLISH' then say ' - 'date()' 'time()'  Checking e-mail from: 'vienede' - 'word(subje,1)' 'word(subje,2)' 'subword(subje,3)
  617.    end
  618.    IF LOGLEV = 2 | LOGLEV = 4
  619.    then do
  620.     IF LANG = 'ESPAÑOL' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  Observando e-mail de: 'vienede' - 'subje'"')
  621.     IF LANG = 'ENGLISH' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  Checking e-mail from: 'vienede' - 'subje'"')
  622.    end
  623.  
  624.    Call SACALIN
  625.   end
  626.   if left(subje,15) = 'Resend Request:' then Call Reenviacepta
  627.  end
  628.  Call Delete(TEMP'compyam')
  629.  
  630. RETURN
  631.  
  632. EXIT
  633.  
  634. SACALIN:
  635.  
  636.  Call Textos('>' , 'Detectado mensaje para mover binario' , 'Message detected to move binary file')
  637.  Call SUBTextos('a 'INBO' desde: 'word(lared,1) , 'to 'INBO' from: 'word(lared,1))
  638.  GetMailInfo FIL
  639.  fichero = RESULT
  640.  if exists(fichero)
  641.  then do 
  642.   if words(subje) = 3 then Call YAMUDT
  643.   if words(subje) = 4 then call YAMING
  644.   if words(subje) ~= 3 & words(subje) ~= 4
  645.   then do
  646.    Call Textos('!' , 'Mensaje con SUBJECT configurado pero sin correo' , 'Message with configured SUBJECT but without mail')
  647.   end
  648.  end
  649.  
  650. RETURN
  651.  
  652. YAMING:
  653.  
  654. if exists(TEMP'YamNet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  655. if ~exists(TEMP'YamNet') then Call Makedir(TEMP'YamNet')
  656. dirname = TEMP'YamNet'
  657. olddir = pragma('d', dirname)
  658.  
  659.  
  660. IF word(subje,4) = 'FSCODE'
  661. then do
  662.  Call MAXTextos('%' , 'Intentandolo con FSCode' , 'Trying it with FSCode')
  663.  CALL DEMAILEA
  664.  Address Command('echo >'TEMP'yach `c:FSCODE 'fichero'`')
  665.  Call pragma('d', olddir)
  666.  call open('tyac',TEMP'yach','R')
  667.  lalalala = readln('tyac')
  668.  call close('tyac')
  669.  call delete(TEMP'yach')
  670.  if right(lalalala,13) = 'no start line'
  671.  then do
  672.   if exists(TEMP'YamNet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  673.  end
  674. end
  675.  
  676.  
  677. if word(subje,4) = 'MIME'
  678. then do
  679.  Call MAXTextos('%' , 'Intentandolo con MIME' , 'Trying it with MIME')
  680.  CALL DEMAILEA
  681.  Address Command('base64decode >'TEMP'yare 'fichero' 'TEMP'yamnet')
  682.  Call pragma('d', olddir)
  683.  Call open('yare',TEMP'yare','R')
  684.  nuevo = 0
  685.  larespu = readln('yare')
  686.  if word(larespu,2) = 'bytes' then nuevo = 1
  687.  if larespu = 'No filename found in MIME header' then nuevo = 0
  688.  Call Close('yare')
  689.  Call Delete(TEMP'Yare')
  690.  if nuevo = 0 then if ~exists(TEMP'yamnet/'word(subje,2)) THEN nuevo = 1
  691. end
  692.  
  693. if word(subje,4) = 'PGP'
  694. then do
  695.  if exists(TEMP'YamNet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  696.  Call Makedir(TEMP'YamNet')
  697.  dirname = TEMP'YamNet'
  698.  olddir = pragma('d', dirname)
  699.  Call PREPEGEPE
  700.  CALL DEMAILEA
  701.  Address Command(elppa'PGP -p >nil: 'fichero)
  702.  elopo = RC
  703.  Call pragma('d', olddir)
  704.  nohacer = 0
  705.  if elopo ~= 0 then nohacer = 1
  706. end
  707.  
  708. if WORD(subje,4) = 'UUIN'
  709. then do
  710.  if exists(TEMP'YamNet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  711.  Call Makedir(TEMP'YamNet')
  712.  Call MAXTextos('%' , 'Intentandolo con UUDECODE()' , 'Trying it with UUDECODE()')
  713.  CALL DEMAILEA
  714.  Address Command('c:UUOUT 'fichero' 'TEMP'YamNet')
  715.  if ~exists(temp'yamnet/'word(subje,2)) THEN nuevo = 1
  716. end
  717.  
  718. fiche = word(subje,2)
  719.  
  720. if ~exists(temp'yamnet/'fiche) then call FALLITO
  721. if exists(temp'yamnet/'fiche)
  722. then do
  723.  tnu = CRC32(temp'yamnet/'fiche)
  724.  tama = tnu
  725.  if tnu ~= word(subje,3)
  726.  then do
  727.   CALL FALLITO
  728.  end
  729.  if tnu = word(subje,3)
  730.  then do
  731.   rnomb = fiche
  732.   if exists(INBO||fiche)
  733.   then do
  734.    pi = 0
  735.    parpar = 0
  736.    do until parpar = 1
  737.     pi = pi + 1
  738.     rnomb = fiche||','pi
  739.     if ~exists(INBO||rnomb) then parpar = 1
  740.    end
  741.   end
  742.   Address Command('copy >NIL: 'temp'yamnet/'fiche' 'INBO||rnomb)
  743.   IF LOGLEV = 1 | LOGLEV = 4
  744.   then do
  745.    IF LANG = 'ESPAÑOL' then say ' < 'date()' 'time()'  'INBO''rnomb' ...preparado.'
  746.    IF LANG = 'ENGLISH' then say ' < 'date()' 'time()'  'INBO''rnomb' ...ready.'
  747.   end
  748.   IF LOGLEV = 2 | LOGLEV = 4
  749.   then do
  750.    IF LANG = 'ESPAÑOL' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  'INBO||rnomb' ...preparado."')
  751.    IF LANG = 'ENGLISH' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  'INBO||rnomb' ...preparado."')
  752.   end
  753.  
  754.   if exists(TEMP'YamNet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  755.   Call HacerRecibo
  756.   if safe = 0
  757.   then do
  758.    Call Delete(autenfichero)
  759.    Call Delete(fichero)
  760.    borros = 1
  761.   end
  762.   if safe ~= 0
  763.   then do
  764.    Call IniSafe
  765.    Address Command('echo >>'TEMP'YamNet.SAFE "delete 'fichero'"')
  766.    Address Command('echo >>'TEMP'YamNet.SAFE "delete 'autenfichero'"')
  767.   end
  768.  
  769.   IF LOGLEV = 1 | LOGLEV = 4
  770.   then do
  771.    e = 0
  772.    quienes = ''
  773.    do pompom = 1 to Nodos
  774.     If upper(LADRE.pompom) = upper(word(vienede,1)) & left(ELNO.pompom,length(tadon)) = tadon then quienes = ELNO.pompom
  775.    end
  776.    if quienes = '' then quienes = word(vienede,words(vienede))
  777.    IF UPPER(LANG) = 'ESPAÑOL' then say ' - 'date()' 'time()'  Desde: 'quienes' - CRC32: 'tama
  778.    IF UPPER(LANG) = 'ENGLISH' then say ' - 'date()' 'time()'  From: 'quienes' - CRC32: 'tama
  779.   end
  780.   IF LOGLEV = 2 | LOGLEV = 4
  781.   then do
  782.    if LOGLEV = 2
  783.    then do
  784.     eee = 0
  785.     pompom = 0
  786.     do until eee = 1
  787.      pompom = pompom + 1
  788.      If upper(LADRE.pompom) = upper(word(vienede,1)) & left(ELNO.pompom,length(tadon)) = tadon
  789.      then do
  790.       quienes = ELNO.pompom
  791.       eee = 1
  792.      end
  793.      if pompom = Nodos then eee = 1
  794.     end
  795.    end
  796.    if quienes = '' then quienes = word(vienede,words(vienede))
  797.    IF UPPER(LANG) = 'ESPAÑOL' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  Desde: 'quienes' - CRC32: 'tama'"')
  798.    IF UPPER(LANG) = 'ENGLISH' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  From: 'quienes' - CRC32: 'tama'"')
  799.   end
  800.  end
  801. end
  802.  
  803. RETURN
  804.  
  805. PREPEGEPE:
  806.  
  807.  elppa = ''
  808.  Address Command('which >'TEMP'YamNetPGP PGP')
  809.  if READFILE(TEMP'YamNetPGP','mipgp')
  810.  then do
  811.   if mipgp.0 > 0 then elppa = left(mipgp.1,length(mipgp.1)-3)
  812.   IF mipgp.0 = 0 then elppa = ''
  813.  end
  814.  Call Delete(TEMP'YamNetPGP')
  815.  if exists('env:PGPPATH')
  816.  then do
  817.   call open('ppa','env:pgppath','R')
  818.   elppa = readln('ppa')
  819.   Call Close('ppa')
  820.   if right(elppa,1) ~= ':' & right(elppa,1) ~= '/' then elppa = elppa||'/'
  821.  end
  822.  if elppa = '' then Call Textos('#' , 'ERROR: PGP No instalado!!' , 'ERROR: PGP not installed!!')
  823.  Call MAXTextos('%' , 'Intentandolo con PGP' , 'Trying it with PGP')
  824. RETURN
  825.  
  826. EXIT
  827.  
  828. BORRADOS:
  829.  
  830. if borros = 1
  831. then do
  832.  Setfolder 0
  833.  mailupdate
  834.  Setfolder 2
  835.  mailupdate
  836.  If YamCheck = 1
  837.  then do
  838.   if exists('env:YamCheck')
  839.   then do
  840.    ELYAM = 'Yacheche'
  841.    Yacheche:
  842.    SIGNAL ON SYNTAX
  843.    mailsendall
  844.    SIGNAL OFF SYNTAX
  845.    setfolder 1
  846.    ope = 0
  847.    do until ope = 1
  848.     getfolderinfo MAX
  849.     ele = RESULT
  850.     if ele = 0 then ope =1
  851.    end
  852.    Call Delete('ENV:YamCheck')
  853.   end
  854.  end
  855. end
  856.  
  857. Call AnteSalir
  858. EXIT
  859.  
  860. FUERADOR:
  861.  
  862.  if upper(UUMOD.elgate) = 'UUIN'
  863.  then do
  864.   Call MRENOP
  865.   elasci = pakter'.uaa'
  866.   Address Command('delete >nil: t:YamOut ALL QUIET NOREQ FORCE')
  867.   Call Makedir('t:YamOut')
  868.   Address Command('copy >NIL: 'pakter' 'renpakter)
  869.   If UUENCODE(renpakter,pakter,,'S') Then Call Lasvaris
  870.   nohayfallos = 0
  871.   if exists(elasci)
  872.   then do
  873.    nohayfallos = 1
  874.    Address Command('echo >>'elasci' " "')
  875.    if LANG = 'ESPAÑOL' then Address Command('echo >>'elasci' "--- Generado con YamNet V3.07 - Alfredo Soro (03 Sep 96 - 20:50)"')
  876.    if LANG = 'ENGLISH' then Address Command('echo >>'elasci' "--- Generated with YamNet V3.07 - by Alfredo Soro (03 Sep 96 - 20:50)"')
  877.    if LANG = 'ESPAÑOL' then Address Command('echo >t:joi "Correo de la Red: 'SUBNO.elgate'"')
  878.    if LANG = 'ENGLISH' then Address Command('echo >t:joi "Mail from the net: 'SUBNO.elgate'"')
  879.    Address Command('echo >>t:joi " "')
  880.    Address Command('Join t:joi 'elasci' AS=t:joined')
  881.    Call Delete('t:joi')
  882.    Address Command('copy t:joined 'elasci' QUIET')
  883.    Call Delete('t:joined')
  884.   end
  885.  end
  886.  
  887.  if upper(UUMOD.elgate) = 'MIME'
  888.  then do
  889.   Call MRENOP
  890.   elasci = pakter'.mime'
  891.   Address Command('delete >nil: t:YamOut ALL QUIET NOREQ FORCE')
  892.   Call Makedir('t:YamOut')
  893.   Address Command('copy >NIL: 'pakter' 'renpakter)
  894.   Address Command('base64encode >t:nore 'renpakter' 'pakter'.mime')
  895.   Call Open('nore','T:nore','R')
  896.   nosenco = readln('nore')
  897.   Call Close('nore')
  898.   Call Delete('t:nore')
  899.   if word(nosenco,2) = 'bytes' then Call LasVaris
  900.   nohayfallos = 0
  901.   if exists(elasci)
  902.   then do
  903.    nohayfallos = 1
  904.    Address Command('echo >>'elasci' " "')
  905.    if LANG = 'ESPAÑOL' then Address Command('echo >>'elasci' "--- Generado con YamNet V3.07 - Alfredo Soro (03 Sep 96 - 20:50)"')
  906.    if LANG = 'ENGLISH' then Address Command('echo >>'elasci' "--- Generated with YamNet V3.07 - by Alfredo Soro (03 Sep 96 - 20:50)"')
  907.    if LANG = 'ESPAÑOL' then Address Command('echo >t:joi "Correo de la Red: 'SUBNO.elgate'"')
  908.    if LANG = 'ENGLISH' then Address Command('echo >t:joi "Mail from the net: 'SUBNO.elgate'"')
  909.    Address Command('echo >>t:joi " "')
  910.    Address Command('Join t:joi 'elasci' AS=t:joined')
  911.    Call Delete('t:joi')
  912.    Address Command('copy t:joined 'elasci' QUIET')
  913.    Call Delete('t:joined')
  914.   end
  915.  end
  916.  
  917.  if upper(UUMOD.elgate) = 'FSCODE'
  918.  then do
  919.   Call MRENOP
  920.   elasci = pakter'.asc'
  921.   Address Command('delete >nil: t:YamOut ALL QUIET NOREQ FORCE')
  922.   Address Command('makedir >NIL: t:YamOut')
  923.   Address Command('copy >NIL: 'pakter' 'renpakter)
  924.   Address Command('c:fscode 'renpakter' 'elasci' E')
  925.   Call Lasvaris
  926.   nohayfallos = 0
  927.   if exists(elasci)
  928.   then do
  929.    nohayfallos = 1
  930.    Address Command('echo >>'elasci' " "')
  931.    if LANG = 'ESPAÑOL' then Address Command('echo >>'elasci' "--- Generado con YamNet V3.07 - Alfredo Soro (03 Sep 96 - 20:50)"')
  932.    if LANG = 'ENGLISH' then Address Command('echo >>'elasci' "--- Generated with YamNet V3.07 - by Alfredo Soro (03 Sep 96 - 20:50)"')
  933.    if LANG = 'ESPAÑOL' then Address Command('echo >t:joi "Correo de la Red: 'SUBNO.elgate'"')
  934.    if LANG = 'ENGLISH' then Address Command('echo >t:joi "Mail from the net: 'SUBNO.elgate'"')
  935.    Address Command('echo >>t:joi " "')
  936.    Address Command('Join t:joi 'elasci' AS=t:joined')
  937.    Call Delete('t:joi')
  938.    Address Command('copy t:joined 'elasci' QUIET')
  939.    Call Delete('t:joined')
  940.   end
  941.  end
  942.  
  943.  if upper(UUMOD.elgate) = 'PGP'
  944.  then do
  945.   Address Command('delete >NIL: T:YamOut ALL QUIET NOREQ FORCE')
  946.   Address Command('makedir >NIL: t:YamOut')
  947.   Call MRENOP
  948.   elasci = renpakter'.asc'
  949.   if exists('env:PGPPATH')
  950.   then do
  951.    call open('ppa','env:pgppath','R')
  952.    elppa = readln('ppa')
  953.    Call Close('ppa')
  954.    if right(elppa,1) ~= ':' & right(elppa,1) ~= '/' then elppa = elppa||'/'
  955.    if LANG='ESPAÑOL' then Address Command(elppa'PGP >NIL: -ea "+comment=Correo de la Red: 'SUBNO.elgate'" 'renpakter' 'TOPGP.elgate)
  956.    if LANG='ENGLISH' then Address Command(elppa'PGP >NIL: -ea "+comment=Mail from the net: 'SUBNO.elgate'" 'renpakter' 'TOPGP.elgate)
  957.    Call Lasvaris
  958.   end
  959.   if ~exists('env:PGPPATH')
  960.   then do
  961.    if LANG='ESPAÑOL' then Address Command('PGP >NIL: -ea "+comment=Correo de la Red: 'SUBNO.elgate'" 'renpakter' 'TOPGP.elgate)
  962.    if LANG='ENGLISH' then Address Command('PGP >NIL: -ea "+comment=Mail from the net: 'SUBNO.elgate'" 'renpakter' 'TOPGP.elgate)
  963.    Call Lasvaris
  964.   end
  965.   nohayfallos = 0
  966.   if exists(elasci)
  967.   then do
  968.    nohayfallos = 1
  969.    Address Command('echo >>'elasci' "&end 'elrenom' 'elcerr'"')
  970.    Address Command('echo >>'elasci' " "')
  971.    if LANG = 'ESPAÑOL' then Address Command('echo >>'elasci' "--- Generado con YamNet V3.07 - Alfredo Soro (03 Sep 96 - 20:50)"')
  972.    if LANG = 'ENGLISH' then Address Command('echo >>'elasci' "--- Generated with YamNet V3.07 - by Alfredo Soro (03 Sep 96 - 20:50)"')
  973.   end
  974.  end
  975.  
  976.  if nohayfallos = 1
  977.  then do
  978.   elmodote = upper(UUMOD.elgate)
  979.   if elmodote = 'UUIN' then elmodote = 'UUIN'
  980.   writemailto LADRE.elgate
  981.   'writesubject "'SUBNO.elgate' 'elrenom' 'elcerr' 'elmodote'"'
  982.   writeletter elasci
  983.   'writeattach ""'
  984.   writequeue
  985.   Address Command('ECHO >ENV:YAMCHECK "MAIL ready to LAUNCH"')
  986.   Call Delete(elasci)
  987.   Address Command('delete >NIL: t:YamOut ALL QUIET NOREQ FORCE')
  988.  
  989.   call secumita
  990.  
  991.   IF LOGLEV = 1 | LOGLEV = 4
  992.   then do
  993.    IF LANG = 'ESPAÑOL' then say ' - 'date()' 'time()'  Enviado binario de: 'elsecuta' bytes. A: 'ELNO.elgate
  994.    IF LANG = 'ENGLISH' then say ' - 'date()' 'time()'  Binary sent of: 'elsecuta' bytes. To: 'ELNO.elgate
  995.   end
  996.   IF LOGLEV = 2 | LOGLEV = 4
  997.   then do
  998.    IF LANG = 'ESPAÑOL' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  Enviado binario de: 'elsecuta' bytes. A: 'ELNO.elgate'"')
  999.    IF LANG = 'ENGLISH' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  Binary sent of: 'elsecuta' bytes. To: 'ELNO.elgate'"')
  1000.   end
  1001.  
  1002.   Call creadat
  1003.   address command('echo >>YAM:YamNet.dat "0 'rehoy' 'SUBNO.elgate' 'elrenom' 'elsecuta' 'elcerr' 'LADRE.elgate'"')
  1004.   address command('rename "'pakter'" "'OUTBO'YamNet/'crc32(pakter)||filepart(renpakter)'"')
  1005.   call textos('+' , 'Almacenado fichero: 'pakter , 'Stored file: 'pakter)
  1006.  end
  1007.  
  1008. RETURN
  1009.  
  1010. Say '--->>> Es imposible que este texto pueda mostrarse <<<---'
  1011. EXIT
  1012.  
  1013. Secumita:
  1014.  
  1015.  address command('list >t:secutama 'pakter' LFORMAT=%l')
  1016.  call open('stm','T:Secutama','R')
  1017.  elsecuta = readln('stm')
  1018.  call close('stm')
  1019.  Call Delete('t:secutama')
  1020.  
  1021. RETURN
  1022.  
  1023. creadat:
  1024.  
  1025.  if ~exists('YAM:YamNet.dat')
  1026.  then do
  1027.   if UPPER(LANG) = 'ESPAÑOL' then address command('ECHO >YAM:YamNet.dat "RE-Enviado Fecha Red Fichero Tamaño CRC Destinatario"')
  1028.   if UPPER(LANG) = 'ENGLISH' then address command('ECHO >YAM:YamNet.dat "RE-Sent Date Network Filename Size CRC Address"')
  1029.  end
  1030.  
  1031. RETURN
  1032.  
  1033. SOLOFUERA:
  1034.  
  1035.  If exists('yam:YamNet.dat')
  1036.  then do
  1037.   Call textos('o' , 'Examinando antiguedad de ficheros enviados' , 'Watching the age of sent files')
  1038.   call open('YNT','Yam:YamNet.dat','R')
  1039.   prima = READLN('YNT')
  1040.   Drop asecu.
  1041.   secuni = 0
  1042.   secumbiado = 0
  1043.   DO UNTIL EOF('YNT')
  1044.    secu = READLN('YNT')
  1045.    if secu ~= '' then secuni = secuni + 1
  1046.    asecu.secuni = secu
  1047.    if datatype(word(secu,2),'N')
  1048.    then do
  1049.     if rehoy >= word(secu,2)+remanda
  1050.     then do
  1051.      LADI = word(secu,7)
  1052.      SUBREMA = word(secu,3)' 'word(secu,4)' 'word(secu,6)
  1053.      remonombre = word(secu,4)
  1054.      remocerr = word(secu,6)
  1055.      Call REMANFICHERO
  1056.      asecu.secuni = word(secu,1)+1' 'date("b")' 'subword(secu,3)
  1057.      secumbiado = 1
  1058.     end
  1059.    end
  1060.   end
  1061.   Call CLOSE('YNT')
  1062.   if secumbiado = 1
  1063.   then do
  1064.    Call open('YWN','YAM:YamNet.dat','W')
  1065.    Call WriteLN('YWN',prima)
  1066.    do secusecu = 1 to secuni
  1067.     Call WriteLN('YWN',asecu.secusecu)
  1068.    end
  1069.    Call Close('YWN')
  1070.   end
  1071.  end
  1072.  
  1073.  Do elgate = 1 to Nodos
  1074.   call textos('+' , 'Buscando archivos para el nodo: 'ELNODO.elgate , 'Looking for bundles to: 'ELNODO.elgate)
  1075.   remiralo = 'flo'
  1076.   Call Miralo FLO
  1077.   TRASFLO:
  1078.   if onlyflo = 0
  1079.   then do
  1080.    remiralo = 'hlo'
  1081.    Call Miralo HLO
  1082.    TRASHLO:
  1083.    remiralo = 'clo'
  1084.    Call Miralo CLO
  1085.    TRASCLO: 
  1086.    remiralo = 'dlo'
  1087.    Call Miralo DLO
  1088.    TRASDLO:
  1089.    remiralo = 'slo'
  1090.   end
  1091.   if exists(OUTBO||ELNODO.elgate||'.OUT')
  1092.   then do
  1093.    pakter = OUTBO||ELNODO.elgate||'.OUT'
  1094.    call FUERADOR
  1095.   end
  1096.   if onlyflo = 0
  1097.   then do
  1098.    if exists(OUTBO||ELNODO.elgate||'.DUT')
  1099.    then do
  1100.     pakter = OUTBO||ELNODO.elgate||'.DUT'
  1101.     call FUERADOR
  1102.    end
  1103.    if exists(OUTBO||ELNODO.elgate||'.CUT')
  1104.    then do
  1105.     pakter = OUTBO||ELNODO.elgate||'.CUT'
  1106.     call FUERADOR
  1107.    end
  1108.    if exists(OUTBO||ELNODO.elgate||'.HUT')
  1109.    then do
  1110.     pakter = OUTBO||ELNODO.elgate||'.HUT'
  1111.     call FUERADOR
  1112.    end
  1113.   end
  1114.  end
  1115. RETURN
  1116. EXIT
  1117.  
  1118. MIRALO:
  1119.  parse arg loque
  1120.  if exists(OUTBO||ELNODO.elgate||'.'loque)
  1121.  then do
  1122.   call textos('+' , 'Examinando fichero 'loque' para: 'ELNODO.elgate , 'Scanning 'loque' file for: 'ELNODO.elgate)
  1123.  
  1124.   call open('miraflo',OUTBO||ELNODO.elgate||'.'loque,'R')
  1125.  
  1126.   do until eof('miraflo')
  1127.    lalou = readln('miraflo')
  1128.    pakter = lalou
  1129.    if length(pakter) < 3 then pakter =''
  1130.  
  1131.    if left(lalou,1) = '#' | left(lalou,1) = '^' | left(lalou,1) = '-'
  1132.    then do
  1133.     pakter = right(lalou,length(lalou)-1)
  1134.    end
  1135.  
  1136.    if length(pakter) ~= 0 & left(lalou,1) ~= '~'
  1137.    then do
  1138.     if ~exists(pakter) then call textos('#' , 'No encontrado -'pakter'- ['ELNODO.elgate']' , 'File not found -'pakter'- ['ELNODO.elgate']')
  1139.     nohayfallos = 0
  1140.     if exists(pakter) & length(pakter) ~= 0
  1141.     then do
  1142.      if upper(UUMOD.elgate) = 'UUIN'
  1143.      then do
  1144.       renpakter = pakter
  1145.       elasci = pakter'.uaa'
  1146.       if left(right(pakter,3),2) = 'MO' | left(right(pakter,3),2) = 'TU' | left(right(pakter,3),2) = 'WE' | left(right(pakter,3),2) = 'TH' | left(right(pakter,3),2) = 'FR' | left(right(pakter,3),2) = 'SA' | left(right(pakter,3),2) = 'SU'
  1147.       then do
  1148.        if right(pakter,1) = '0' | right(pakter,1) = '1' | right(pakter,1) = '2' | right(pakter,1) = '3' | right(pakter,1) = '4' | right(pakter,1) = '5' | right(pakter,1) = '6' | right(pakter,1) = '7' | right(pakter,1) = '8' | right(pakter,1) = '9'
  1149.        then do
  1150.         call MRPA
  1151.        end
  1152.       end
  1153.       if exists(TEMP'YamOut') then Address Command('delete >nil: 'TEMP'YamOut ALL QUIET NOREQ FORCE')
  1154.       Call Makedir(TEMP'YamOut')
  1155.       Address Command('copy >NIL: 'pakter' 'renpakter)
  1156.       IF UUENCODE(renpakter,pakter,,'S') then Call Lasvaris
  1157.       nohayfallos = 0
  1158.       if exists(elasci)
  1159.       then do
  1160.        nohayfallos = 1
  1161.        Address Command('echo >>'elasci' " "')
  1162.        Call GESP
  1163.        IF UPPER(LANG) = 'ESPAÑOL' then Address Command('echo >t:joi "Correo de la Red: 'SUBNO.elgate'"')
  1164.        IF UPPER(LANG) = 'ENGLISH' then Address Command('echo >t:joi "Mail from the net: 'SUBNO.elgate'"')
  1165.        Address Command('echo >>t:joi " "')
  1166.        Address Command('Join t:joi 'elasci' AS=t:joined')
  1167.        Call Delete('t:joi')
  1168.        Address Command('copy t:joined 'elasci' QUIET')
  1169.        Call Delete('t:joined')
  1170.       end
  1171.      end
  1172.  
  1173.  
  1174.      if upper(UUMOD.elgate) = 'MIME'
  1175.      then do
  1176.       renpakter = pakter
  1177.       elasci = pakter'.mime'
  1178.       if left(right(pakter,3),2) = 'MO' | left(right(pakter,3),2) = 'TU' | left(right(pakter,3),2) = 'WE' | left(right(pakter,3),2) = 'TH' | left(right(pakter,3),2) = 'FR' | left(right(pakter,3),2) = 'SA' | left(right(pakter,3),2) = 'SU'
  1179.       then do
  1180.        if right(pakter,1) = '0' | right(pakter,1) = '1' | right(pakter,1) = '2' | right(pakter,1) = '3' | right(pakter,1) = '4' | right(pakter,1) = '5' | right(pakter,1) = '6' | right(pakter,1) = '7' | right(pakter,1) = '8' | right(pakter,1) = '9'
  1181.        then do
  1182.         Call MRPA
  1183.        end
  1184.       end
  1185.       if exists(TEMP'YamOut') then Address Command('delete >nil: 'TEMP'YamOut ALL QUIET NOREQ FORCE')
  1186.       Call Makedir(TEMP'YamOut')
  1187.       Address Command('copy >NIL: 'pakter' 'renpakter)
  1188.       Address Command('base64encode >'TEMP'nore 'renpakter' 'pakter'.mime')
  1189.       Call Open('nore',TEMP'nore','R')
  1190.       nosenco = readln('nore')
  1191.       Call Close('nore')
  1192.       Call Delete(TEMP'nore')
  1193.       if word(nosenco,2) = 'bytes' then Call LasVaris
  1194.       nohayfallos = 0
  1195.       if exists(elasci)
  1196.       then do
  1197.        nohayfallos = 1
  1198.        Call GESP
  1199.        IF UPPER(LANG) = 'ESPAÑOL' then Address Command('echo >t:joi "Correo de la Red: 'SUBNO.elgate'"')
  1200.        IF UPPER(LANG) = 'ENGLISH' then Address Command('echo >t:joi "Mail from the net: 'SUBNO.elgate'"')
  1201.        Address Command('echo >>t:joi " "')
  1202.        Address Command('Join t:joi 'elasci' AS=t:joined')
  1203.        Call Delete('t:joi')
  1204.        Address Command('copy t:joined 'elasci' QUIET')
  1205.        Call Delete('t:joined')
  1206.       end
  1207.      end
  1208.  
  1209.  
  1210.      if upper(UUMOD.elgate) = 'FSCODE'
  1211.      then do
  1212.       renpakter = pakter
  1213.       elasci = pakter'.asc'
  1214.       if left(right(pakter,3),2) = 'MO' | left(right(pakter,3),2) = 'TU' | left(right(pakter,3),2) = 'WE' | left(right(pakter,3),2) = 'TH' | left(right(pakter,3),2) = 'FR' | left(right(pakter,3),2) = 'SA' | left(right(pakter,3),2) = 'SU'
  1215.       then do
  1216.        if right(pakter,1) = '0' | right(pakter,1) = '1' | right(pakter,1) = '2' | right(pakter,1) = '3' | right(pakter,1) = '4' | right(pakter,1) = '5' | right(pakter,1) = '6' | right(pakter,1) = '7' | right(pakter,1) = '8' | right(pakter,1) = '9'
  1217.        then do
  1218.         CALL MRPA
  1219.         elasci = renpakter'.asc'
  1220.        end
  1221.       end
  1222.       if exists(TEMP'YamOut') then Address Command('delete >nil: 'TEMP'YamOut ALL QUIET NOREQ FORCE')
  1223.       Address Command('makedir >NIL: 'TEMP'YamOut')
  1224.       Address Command('copy >NIL: 'pakter' 'renpakter)
  1225.       Address Command('c:fscode 'renpakter' 'elasci' E')
  1226.       Call Lasvaris
  1227.       nohayfallos = 0
  1228.       if exists(elasci)
  1229.       then do
  1230.        nohayfallos = 1
  1231.        Call GESP
  1232.        IF UPPER(LANG) = 'ESPAÑOL' then Address Command('echo >t:joi "Correo de la Red: 'SUBNO.elgate'"')
  1233.        IF UPPER(LANG) = 'ENGLISH' then Address Command('echo >t:joi "Mail from the net: 'SUBNO.elgate'"')
  1234.        Address Command('echo >>t:joi " "')
  1235.        Address Command('Join t:joi 'elasci' AS=t:joined')
  1236.        Call Delete('t:joi')
  1237.        Address Command('copy t:joined 'elasci' QUIET')
  1238.        Call Delete('t:joined')
  1239.       end
  1240.      end
  1241.  
  1242.      if upper(UUMOD.elgate) = 'PGP'
  1243.      then do
  1244.       renpakter = pakter
  1245.       elasci = renpakter'.asc'
  1246.       if left(right(pakter,3),2) = 'MO' | left(right(pakter,3),2) = 'TU' | left(right(pakter,3),2) = 'WE' | left(right(pakter,3),2) = 'TH' | left(right(pakter,3),2) = 'FR' | left(right(pakter,3),2) = 'SA' | left(right(pakter,3),2) = 'SU'
  1247.       then do
  1248.        if right(pakter,1) = '0' | right(pakter,1) = '1' | right(pakter,1) = '2' | right(pakter,1) = '3' | right(pakter,1) = '4' | right(pakter,1) = '5' | right(pakter,1) = '6' | right(pakter,1) = '7' | right(pakter,1) = '8' | right(pakter,1) = '9'
  1249.        then do
  1250.         CALL MRPA
  1251.         elasci = renpakter'.asc'
  1252.        end
  1253.       end
  1254.       if exists(TEMP'YamOut') then Address Command('delete >nil: 'TEMP'YamOut ALL QUIET NOREQ FORCE')
  1255.       Address Command('makedir >NIL: 'TEMP'YamOut')
  1256.       Address Command('copy >NIL: 'pakter' 'renpakter)
  1257.  
  1258.       if exists('env:PGPPATH')
  1259.       then do
  1260.        call open('ppa','env:pgppath','R')
  1261.        elppa = readln('ppa')
  1262.        Call Close('ppa')
  1263.        if right(elppa,1) ~= ':' & right(elppa,1) ~= '/' then elppa = elppa||'/'
  1264.        if LANG='ESPAÑOL' then Address Command(elppa'PGP >NIL: -ea "+comment=Correo de la Red: 'SUBNO.elgate'" 'renpakter' 'TOPGP.elgate)
  1265.        if LANG='ENGLISH' then Address Command(elppa'PGP >NIL: -ea "+comment=Mail from the net: 'SUBNO.elgate'" 'renpakter' 'TOPGP.elgate)
  1266.        Call Lasvaris
  1267.       end
  1268.       if ~exists('env:PGPPATH')
  1269.       then do
  1270.        if LANG='ESPAÑOL' then Address Command('PGP >NIL: -ea "+comment=Correo de la Red: 'SUBNO.elgate'" 'renpakter' 'TOPGP.elgate)
  1271.        if LANG='ENGLISH' then Address Command('PGP >NIL: -ea "+comment=Mail from the net: 'SUBNO.elgate'" 'renpakter' 'TOPGP.elgate)
  1272.        Call Lasvaris
  1273.       end
  1274.       nohayfallos = 0
  1275.       if exists(elasci)
  1276.       then do
  1277.        nohayfallos = 1
  1278.        Address Command('echo >>'elasci' "&end 'elrenom' 'elcerr'"')
  1279.        Call GESP
  1280.       end
  1281.      end
  1282.  
  1283.      if nohayfallos = 1
  1284.      then do
  1285.       elmodote = upper(UUMOD.elgate)
  1286.       if elmodote = 'UUIN' then elmodote = 'UUIN'
  1287.      Escribello:
  1288.       ELYAM = 'Escribello'
  1289.       SIGNAL ON SYNTAX
  1290.       IF NOHIDE = 0 then HIDE
  1291.       MailWrite
  1292.       writemailto LADRE.elgate
  1293.       SIGNAL OFF SYNTAX
  1294.       'writesubject "'SUBNO.elgate' 'elrenom' 'elcerr' 'elmodote'"'
  1295.       writeletter elasci
  1296.       writequeue
  1297.       Address Command('ECHO >ENV:YAMCHECK "MAIL ready to LAUNCH"')
  1298.       Call Delete(elasci)
  1299.       If exists(TEMP'YamOut') then Address Command('delete >NIL: 'TEMP'YamOut ALL QUIET NOREQ FORCE')
  1300.  
  1301.       Call secumita
  1302.  
  1303.       IF LOGLEV = 1 | LOGLEV = 4
  1304.       then do
  1305.        IF UPPER(LANG) = 'ESPAÑOL' then say ' - 'date()' 'time()'  Enviado binario con CRC32: 'elcerr' A: 'ELNO.elgate
  1306.        IF UPPER(LANG) = 'ENGLISH' then say ' - 'date()' 'time()'  Binary sent with CRC32: 'elcerr' To: 'ELNO.elgate
  1307.       end
  1308.       IF LOGLEV = 2 | LOGLEV = 4
  1309.       then do
  1310.        IF UPPER(LANG) = 'ESPAÑOL' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  Enviado binario con CRC32: 'elcerr' A: 'ELNO.elgate'"')
  1311.        IF UPPER(LANG) = 'ENGLISH' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  Binary sent with CRC32: 'elcerr' To: 'ELNO.elgate'"')
  1312.       end
  1313.  
  1314.       Call creadat
  1315.       address command('echo >>YAM:YamNet.dat "0 'rehoy' 'SUBNO.elgate' 'elrenom' 'elsecuta' 'elcerr' 'LADRE.elgate'"')
  1316.       if safe = 0
  1317.       then do
  1318.        if left(lalou,1) = '#'
  1319.        then do
  1320.         address command('rename "'pakter'" "'OUTBO'YamNet/'crc32(pakter)||filepart(renpakter)'"')
  1321.         Address Command('echo >'pakter' NOLINE')
  1322.        end
  1323.       end
  1324.       if safe ~= 0
  1325.       then do
  1326.        if left(lalou,1) = '#'
  1327.        then do
  1328.         call IniSafe
  1329.         address command('rename "'pakter'" "'OUTBO'YamNet/'crc32(pakter)||filepart(renpakter)'"')
  1330.         Address Command('echo >>'TEMP'YamNet.SAFE "Echo >'pakter' NOLINE"')
  1331.        end
  1332.       end
  1333.       if left(lalou,1) = '^'
  1334.       then do
  1335.        address command('rename "'pakter'" "'OUTBO'YamNet/'crc32(pakter)||filepart(renpakter)'"')
  1336.        Call Textos('+' , 'Almacenado fichero: 'pakter , 'Stored file: 'pakter)
  1337.       end
  1338.  
  1339.       if left(lalou,1) = '-'
  1340.       then do
  1341.        address command('rename "'pakter'" "'OUTBO'YamNet/'crc32(pakter)||filepart(renpakter)'"')
  1342.       end
  1343.      end
  1344.     end
  1345.    end
  1346.    if left(lalou,1) = '~' then Call Textos('#' , 'Fichero 'pakter' marcado en el 'loque' como ya enviado' , 'File 'pakter' marked in 'loque' as already sent')
  1347.   end
  1348.   call close('miraflo')
  1349.   Call Textos('#' , 'Fichero 'OUTBO||ELNODO.elgate||'.'loque' procesado' , 'File 'OUTBO||ELNODO.elgate||'.'loque' processed')
  1350.  
  1351.   if safe = 0
  1352.   then do
  1353.    Call Delete(OUTBO||ELNODO.elgate||'.'loque)
  1354.    Call Textos('#' , 'Fichero 'OUTBO||ELNODO.elgate||'.'loque' eliminado' , 'File 'OUTBO||ELNODO.elgate||'.'loque' deleted')
  1355.   end
  1356.   if safe ~= 0
  1357.   then do
  1358.    Call IniSafe
  1359.    Address Command('echo >>'TEMP'YamNet.SAFE "delete 'OUTBO||ELNODO.elgate||'.'loque'"')
  1360.   end
  1361.  
  1362.  end
  1363. return
  1364.  
  1365. EXIT
  1366.  
  1367.  
  1368. GESP:
  1369.  
  1370.  Address Command('echo >>'elasci' "-- "')
  1371.  Address Command('echo >>'elasci' ""')
  1372.  IF upper(LANG) = 'ESPAÑOL' then Address Command('echo >>'elasci' "--- Generado con YamNet V3.07 - Alfredo Soro (31 Dic 96 - 04:00)"')
  1373.  IF upper(LANG) = 'ENGLISH' then Address Command('echo >>'elasci' "--- Generated with YamNet V3.07 - by Alfredo Soro (31 Dic 96 - 04:00)"')
  1374.  
  1375. RETURN
  1376.  
  1377. MRPA:
  1378.  
  1379.  Call RPAK
  1380.  if exists(OUTBO'YamNet/'crc32(pakter)||filepart(renpakter))
  1381.  then do
  1382.   do until ~exists(OUTBO'YamNet/'crc32(pakter)||filepart(renpakter))
  1383.    Call RPAK
  1384.   end
  1385.  end
  1386.  
  1387. RETURN
  1388.  
  1389. MRENOP:
  1390.  
  1391.  Call RENOPKT
  1392.  if exists(OUTBO'YamNet/'crc32(pakter)||filepart(renpakter))
  1393.  then do
  1394.   do until ~exists(OUTBO'YamNet/'crc32(pakter)||filepart(renpakter))
  1395.    Call RENOPKT
  1396.   end
  1397.  end
  1398.  
  1399. RETURN
  1400.  
  1401. RPAK:
  1402. Call RENOP
  1403. renpakter = renpakter||'.'right(pakter,3)
  1404. RETURN
  1405.  
  1406. RENOPKT:
  1407. Call RENOP
  1408. renpakter = renpakter'.PKT'
  1409. RETURN
  1410.  
  1411. RENOP:
  1412. renpakter = TEMP'YamOut/'d2x(right(time('s'),1)+rand(0,6))||d2x(rand(0,15))||d2x(right(date(d),1)+rand(0,6))||d2x(rand(0,15))||d2x(right(date(d),1)+rand(0,14-(right(date(d),1))))||d2x(left(time('e'),1)+rand(0,6))||d2x(left(right(time('e'),2),1)+rand(0,6))||d2x(right(time('e'),1)+rand(0,6))
  1413. RETURN
  1414.  
  1415. EXIT
  1416.  
  1417.  
  1418. PREFS:
  1419.  
  1420. Say ''
  1421. Say ' Activating PREFS routine - Activando rutina de PREFERENCIAS'
  1422. Say ''
  1423.  
  1424. LENPREFS:
  1425.  
  1426. primera = rtezrequest("Language     Idioma", " ENGLISH | ESPAÑOL ", '     YamNet   Prefs')
  1427.  
  1428. if primera = 0 then LANG = 'Español'
  1429. if primera = 1 then LANG = 'English'
  1430.  
  1431. RETURN
  1432.  
  1433. LOGFPREFS:
  1434.  
  1435.  IF Upper(LANG) = 'ESPAÑOL' then directo = '¿Fichero de reporte/log para YamNet?'
  1436.  IF Upper(LANG) = 'ENGLISH' then directo = 'Logfile for YamNet?'
  1437.  segunda = rtfilerequest("ram:", "YamNet.log", directo)
  1438.  
  1439.  if segunda = '' then segunda = 'Ram:YamNet.log'
  1440.  LOGFIL = segunda
  1441.  
  1442. RETURN
  1443.  
  1444. REMAPREFS:
  1445.  
  1446.  If Upper(LANG) = 'ESPAÑOL' then remanca = '¿Cuantos días hay que esperar respuesta'||NL||'     antes de RE-ENVIAR un archivo?'
  1447.  If Upper(LANG) = 'ENGLISH' then remanca = '¿How many days must to wait for an answer'||NL'      before RE-SEND a bundle-file?'
  1448.  remanda = 0
  1449.  do until remanda > 0
  1450.   remanda = rtgetlong(15,remanca," YamNet PREFS V3.07")
  1451.  end
  1452. RETURN
  1453.  
  1454. REBOPREFS:
  1455.  
  1456.  If Upper(LANG) = 'ESPAÑOL' then remanca = '¿Cuantos días hay que esperar respuesta'||NL||'      antes de BORRAR un archivo?'
  1457.  If Upper(LANG) = 'ENGLISH' then remanca = '¿How many days must to wait for an answer'||NL'     before DELETE a bundle-file?'
  1458.  reborra = 'F'
  1459.  do until datatype(reborra,'N')
  1460.   reborra = rtgetlong(28,remanca," YamNet PREFS V3.07")
  1461.  end
  1462.  
  1463. RETURN
  1464.  
  1465. INPREFS:
  1466.  
  1467.  IF Upper(LANG) = 'ESPAÑOL' then mensa = '¿Directorio Inbound?'
  1468.  IF Upper(LANG) = 'ENGLISH' then mensa = 'Inbound directory?'
  1469.  conti = 0
  1470.  do until conti = 1
  1471.   cuarta = rtgetstring("Inbound:",mensa," YamNet PREFS V3.07")
  1472.   if cuarta ~= '' then if exists(cuarta) then conti = 1
  1473.   if conti ~= 1
  1474.   then do
  1475.    IF Upper(LANG) = 'ESPAÑOL' then mensa = 'Directorio no asignado o creado. ¿Directorio Inbound?'
  1476.    IF Upper(LANG) = 'ENGLISH' then mensa = 'Directory not assigned or created. Inbound Directory?'
  1477.   end
  1478.  end
  1479.  INBO = cuarta
  1480.  inb = INBO'/'
  1481.  if right(INBO,1) = ':' then inb = INBO
  1482.  if right(INBO,1) = '/' then inb = INBO
  1483.  INBO = inb
  1484.  
  1485. RETURN
  1486.  
  1487. OUTPREFS:
  1488.  
  1489.  IF Upper(LANG) = 'ESPAÑOL' then mensa = '¿Directorio Outbound?'
  1490.  IF Upper(LANG) = 'ENGLISH' then mensa = 'Outbound directory?'
  1491.  conti = 0
  1492.  do until conti = 1
  1493.   quinta = rtgetstring("Outbound:",mensa," YamNet PREFS V3.07")
  1494.   if quinta ~= '' then if exists(quinta) then conti = 1
  1495.   if conti ~= 1
  1496.   then do
  1497.    IF Upper(LANG) = 'ESPAÑOL' then mensa = 'Directorio no asignado o creado. ¿Directorio Outbound?'
  1498.    IF Upper(LANG) = 'ENGLISH' then mensa = 'Directory not assigned or created. Outbound Directory?'
  1499.   end
  1500.  end
  1501.  OUTBO = quinta
  1502.  outb = OUTBO'/'
  1503.  if right(OUTBO,1) = ':' then outb = OUTBO
  1504.  if right(OUTBO,1) = '/' then outb = OUTBO
  1505.  OUTBO = outb
  1506.  
  1507. RETURN
  1508.  
  1509. TEMPPREFS:
  1510.  
  1511.  IF Upper(LANG) = 'ESPAÑOL' then mensa = '¿Directorio temporal? P.Ej: T:'||NL||'o Dh1:t/ con poca memoria'
  1512.  IF Upper(LANG) = 'ENGLISH' then mensa = 'Temporal directory? p.e: T:'||NL||'or DH1:T/ if you have low memory'
  1513.  conti = 0
  1514.  do until conti = 1
  1515.   nosecuarta = rtgetstring("T:",mensa," YamNet PREFS V3.07")
  1516.   if nosecuarta ~= '' then if exists(nosecuarta) then conti = 1
  1517.   if conti ~= 1
  1518.   then do
  1519.    IF Upper(LANG) = 'ESPAÑOL' then mensa = 'Directorio no asignado o creado. ¿Directorio temporal?'
  1520.    IF Upper(LANG) = 'ENGLISH' then mensa = 'Directory not assigned or created. Temporal directory?'
  1521.   end
  1522.  end
  1523.  TEMP = nosecuarta
  1524.  tem = TEMP'/'
  1525.  if right(TEMP,1) = ':' then TEm = TEMP
  1526.  if right(TEMP,1) = '/' then TEm = TEMP
  1527.  TEMP = TEm
  1528.  
  1529. RETURN
  1530.  
  1531. LOGLPREFS:
  1532.  
  1533.  IF Upper(LANG) = 'ESPAÑOL'
  1534.  then do
  1535.   sexta = rtezrequest("Nivel de información en Ventana/Fichero?", "Normal-V.|Normal-F.|Parcial-V.yF.|Total-V.yF.|Ninguna", ' YamNet PREFS V3.07')
  1536.   LOGLEV = sexta
  1537.  end
  1538.  
  1539.  IF Upper(LANG) = 'ENGLISH'
  1540.  then do
  1541.   sexta = rtezrequest("Information level in _W_indow/log_F_ile?", "Normal-W.|Normal-F.|Partial-W.&F.|Total-W.&F.|None", ' YamNet PREFS V3.07')
  1542.   LOGLEV = sexta
  1543.  end
  1544.  
  1545. RETURN
  1546.  
  1547. PGPPREFS:
  1548.  
  1549.  if ~exists('env:PGPPASS')
  1550.  then do
  1551.   IF Upper(LANG) = 'ENGLISH'
  1552.   then do
  1553.    septima = rtezrequest("Do you pretend to receive PGPed mails?", "Yes|No", ' YamNet PREFS V3.07')
  1554.    if septima = '1'
  1555.    then do
  1556.     saldelbucle = 0
  1557.     do until saldelbucle = 1
  1558.      octava = rtgetstring("a partridge in a pear tree","Type in your PGP passphrase"," PGP PREFS")
  1559.      novena = rtgetstring("","Re-Type your PGP passphrase, again."," PGP PREFS")
  1560.      if octava = novena
  1561.      then do
  1562.       address command('setenv PGPPASS 'octava)
  1563.       address command('copy >NIL: env:PGPPASS envarc: CLONE')
  1564.       saldelbucle = 1
  1565.      end
  1566.     end
  1567.    end
  1568.   end
  1569.  
  1570.   IF Upper(LANG) = 'ESPAÑOL'
  1571.   then do
  1572.    septima = rtezrequest("Pretendes recibir correo PGPeado?", "Si|No", ' YamNet PREFS V3.07')
  1573.    if septima = '1'
  1574.    then do
  1575.     saldelbucle = 0
  1576.     do until saldelbucle = 1
  1577.      octava = rtgetstring("dabale arroz a la zorra el abad","Teclea dentro tu frase clave de PGP"," PGP PREFS")
  1578.      novena = rtgetstring("","Teclea tu frase clave de PGP, de nuevo."," PGP PREFS")
  1579.      if octava = novena
  1580.      then do
  1581.       address command('setenv PGPPASS 'octava)
  1582.       address command('copy >NIL: env:PGPPASS envarc: CLONE')
  1583.       saldelbucle = 1
  1584.      end
  1585.     end
  1586.    end
  1587.   end
  1588.  end
  1589.  
  1590. RETURN
  1591.  
  1592. NODPREFS:
  1593.  
  1594.  saldremos = 0
  1595.  DO until saldremos = 1
  1596.  
  1597.   IF Upper(LANG) = 'ENGLISH' then mensa = 'Type in fido-ZONE number for point/node'||NL||' to receive mails from. (p.e.: 2 [of 2:345/67.0])'
  1598.   IF Upper(LANG) = 'ESPAÑOL' then mensa = 'Teclea el numero de ZONA-fido del punto/nodo del que'||NL||' recibir correo. (p.ej.: 2 [de 2:345/67.0])'
  1599.   IF Upper(LANG) = 'ESPAÑOL' then ies = 'Vacio para terminar!'
  1600.   IF Upper(LANG) = 'ENGLISH' then ies = 'Empty to end!'
  1601.   ultimo = rtgetlong(,mensa,' YamNet PREFS V3.07 ['ies']')
  1602.   if ultimo = '' then saldremos = 1
  1603.   if saldremos ~= 1
  1604.   then do
  1605.    exiss = 0
  1606.    do ele = 1 to zonas
  1607.     if SUBZ.ele = ultimo then exiss = 1
  1608.    end
  1609.    if exiss = 0
  1610.    then do
  1611.     zonas = zonas + 1
  1612.     SUBZ.zonas = ultimo
  1613.     IF Upper(LANG) = 'ENGLISH' then cualzo = 'Subject for mails of 'ultimo' Network? [p.e.: FidoE-Mail]'
  1614.     IF Upper(LANG) = 'ESPAÑOL' then cualzo = 'Subject para mensajes de la red 'ultimo'? [P.ej.: FidoE-Mail]'
  1615.     eltemz = ''
  1616.     do until eltemz ~= ''
  1617.      eltemz = rtgetstring("",cualzo," YamNet PREFS V3.07")
  1618.     end
  1619.     SUBJ.zonas = eltemz
  1620.    end
  1621.  
  1622.    elnez = ''
  1623.    do until elnez ~= ''
  1624.     elnez = rtgetlong(,'Network? (p.e: 345 [2:345/67.0]'," YamNet PREFS V3.07")
  1625.    end
  1626.  
  1627.    oligoelemento = ''
  1628.    IF Upper(LANG) = 'ESPAÑOL' then nodesp = '¿Nodo? (p.ej.: 67 [en 2:345/67.0]'
  1629.    IF Upper(LANG) = 'ENGLISH' then nodesp = 'Node? (p.e.: 67 [from 2:345/67.0]'
  1630.    do until oligoelemento ~= ''
  1631.     oligoelemento = rtgetlong(,nodesp," YamNet PREFS V3.07")
  1632.    end
  1633.  
  1634.    xal = 0
  1635.    plusis = 0
  1636.  
  1637.    do until xal = 1
  1638.     IF Upper(LANG) = 'ENGLISH' then puesp = 'Point Number for 'ultimo':'elnez'/'oligoelemento'? [Empty to end]'
  1639.     IF Upper(LANG) = 'ESPAÑOL' then puesp = '¿Número de punto para 'ultimo':'elnez'/'oligoelemento'? [Vacio para terminar]'
  1640.     raspuntin = rtgetlong(,puesp," YamNet PREFS V3.07")
  1641.  
  1642.     if raspuntin = ''
  1643.     then do
  1644.      xal = 1
  1645.      if plusis = 0 then raspuntin = 0
  1646.     end
  1647.  
  1648.     if raspuntin ~= ''
  1649.     then do
  1650.      plusis = plusis + 1
  1651.      nodos = nodos + 1
  1652.      ELNO.nodos = ultimo'.'elnez'.'oligoelemento'.'raspuntin
  1653.      IF Upper(LANG) = 'ESPAÑOL' then nomesp = '¿Dirección de email de 'ultimo':'elnez'/'oligoelemento'.'raspuntin'? p.ej.: asoro@redestb.es'
  1654.      IF Upper(LANG) = 'ENGLISH' then nomesp = ultimo':'elnez'/'oligoelemento'.'raspuntin' e-mail address? p.e.: asoro@redestb.es'
  1655.      LADRE.nodos = rtgetstring("",nomesp,' YamNet PREFS V3.07')
  1656.      CALL MODPREFS
  1657.     end
  1658.    end
  1659.   end
  1660.  end
  1661.  
  1662. RETURN
  1663.  
  1664. ONLYFLOPREFS:
  1665.  
  1666.  IF Upper(LANG) = 'ESPAÑOL'
  1667.  then do
  1668.   lonles = 'Procesar solo ficheros FLO[Normal], o procesar tambien'||NL||'ficheros HLO[Puntos/Downlinks], DLO[Directos] y CLOs[Crash]?'
  1669.   reonls = 'Todo|Solo los FLO'
  1670.  end
  1671.  IF Upper(LANG) = 'ENGLISH'
  1672.  then do
  1673.   lonles = 'Process only FLO[Normal] files?, or process also'||NL||'HLO[Points/Downlinks], DLO[Direct] & CLOs[Crash] files?'
  1674.   reonls = 'All|Only FLO files'
  1675.  end
  1676.  
  1677.  onlyfl = rtezrequest(lonles,reonls,' YamNet PREFS V3.07')
  1678.  
  1679.  if onlyfl = 0 then onlyflo = 1
  1680.  if onlyfl = 1 then onlyflo = 0
  1681.  
  1682. RETURN
  1683.  
  1684. NOHIDEPREFS:
  1685.  
  1686.  IF Upper(LANG) = 'ESPAÑOL'
  1687.  then do
  1688.   yales = '¿Ocultar YAM mientras YamNet escribe?'
  1689.   reyac = 'No|Si'
  1690.  end
  1691.  IF Upper(LANG) = 'ENGLISH'
  1692.  then do
  1693.   yales = 'Hide YAM while YamNet is writing'
  1694.   reyac = 'No|Yes'
  1695.  end
  1696.  
  1697.  yamche = rtezrequest(yales,reyac,' YamNet PREFS V3.07')
  1698.  
  1699.  if yamche = 0 then NOHIDE = 1
  1700.  if yamche = 1 then NOHIDE = 0
  1701.  
  1702. RETURN
  1703.  
  1704.  
  1705.  
  1706. YAMCHECKPREFS:
  1707.  
  1708.  IF Upper(LANG) = 'ESPAÑOL'
  1709.  then do
  1710.   yales = '¿Recoger y enviar correo al ejecutar YamNet?'||NL||'[Se debe estar conectado a internet antes de ejecutarlo]'
  1711.   reyac = 'No|Si'
  1712.  end
  1713.  IF Upper(LANG) = 'ENGLISH'
  1714.  then do
  1715.   yales = 'Send & Get e-mail when YamNet is executed?'||NL||'[Must be conected to internet before execute it]'
  1716.   reyac = 'No|Yes'
  1717.  end
  1718.  
  1719.  yamche = rtezrequest(yales,reyac,' YamNet PREFS V3.07')
  1720.  
  1721.  if yamche = 0 then yamcheck = 1
  1722.  if yamche = 1 then yamcheck = 0
  1723.  
  1724. RETURN
  1725.  
  1726. PURGEPREFS:
  1727.  
  1728.  IF Upper(LANG) = 'ESPAÑOL'
  1729.  then do
  1730.   purles = '¿Borrar siempre mensajes viejos generados por YamNet?'
  1731.   repur = 'SI|No'
  1732.  end
  1733.  IF Upper(LANG) = 'ENGLISH'
  1734.  then do
  1735.   purles = 'Always delete old messages generated by YamNet?'
  1736.   repur = 'YES|No'
  1737.  end
  1738.  
  1739.  purg = rtezrequest(purles,repur,' YamNet PREFS V3.07')
  1740.  
  1741.  PURGY = purg
  1742.  
  1743. RETURN
  1744.  
  1745. GRABACFG:
  1746.  
  1747.  Call open('ycg','S:YamNet.cfg','W')
  1748.  CALL WriteLN('ycg', ";YamNet V3.07 config")
  1749.  
  1750.  do el = 1 to nodos
  1751.   if UUMOD.el = 'PGP' then CALL WriteLN('ycg','NODO = 'ELNO.el' 'LADRE.el' 'UUMOD.el' 'TOPGP.el)
  1752.   if UUMOD.el ~= 'PGP' then CALL WriteLN('ycg','NODO = 'ELNO.el' 'LADRE.el' 'UUMOD.el)
  1753.  end
  1754.  
  1755.  do sel = 1 to zonas
  1756.   CALL WriteLN('ycg','SUBZONA = 'SUBZ.sel' 'SUBJ.sel)
  1757.  end
  1758.  
  1759.  CALL WriteLN('ycg','INBOUND = 'INBO)
  1760.  CALL WriteLN('ycg','OUTBOUND = 'OUTBO)
  1761.  CALL WriteLN('ycg','LANG = 'LANG)
  1762.  CALL WriteLN('ycg','LOG = 'LOGFIL)
  1763.  CALL WriteLN('ycg','TEMP = 'TEMP)
  1764.  CALL WriteLN('ycg','LOGLEVEL = 'LOGLEV)
  1765.  CALL WriteLN('ycg','RESEND = 'remanda)
  1766.  CALL WriteLN('ycg','DELETE = 'reborra)
  1767.  IF ONLYFLO = 1 then CALL WriteLN('ycg','ONLYFLO')
  1768.  IF NOHIDE = 1 then CALL WriteLN('ycf','NOHIDE')
  1769.  IF YAMCHECK = 1 then CALL WriteLN('ycg','YAMCHECK')
  1770.  IF PURGY = 1 then CALL WriteLN('ycg','PURGE')
  1771.  Call CLOSE('ycg')
  1772.  
  1773. RETURN
  1774.  
  1775. Say 'SI SALE ESTO, HAY UN ERROR'
  1776.  
  1777. EXIT
  1778.  
  1779. Textos:
  1780.  parse arg signo , espan , engli
  1781.  sdt = ' 'signo' 'date()' 'time()'  '
  1782.  IF LOGLEV = 1 | LOGLEV = 3 | LOGLEV = 4
  1783.  then do
  1784.   if LANG='ESPAÑOL' Then Say sdt||espan
  1785.   if LANG='ENGLISH' Then Say sdt||engli
  1786.  end
  1787.  IF LOGLEV = 2 | LOGLEV = 3 | LOGLEV = 4
  1788.  then do
  1789.   if LANG='ESPAÑOL' Then Address Command('echo >>t:logyamnet.tmp "'sdt||espan'"')
  1790.   if LANG='ENGLISH' Then Address Command('echo >>t:logyamnet.tmp "'sdt||engli'"')
  1791.  end
  1792. RETURN
  1793.  
  1794. EXIT
  1795.  
  1796. SUBTextos:
  1797.  parse arg espan , engli
  1798.  IF LOGLEV = 1 | LOGLEV = 3 | LOGLEV = 4
  1799.  then do
  1800.   if LANG='ESPAÑOL' Then Say '                          'espan
  1801.   if LANG='ENGLISH' Then Say '                          'engli
  1802.  end
  1803.  IF LOGLEV = 2 | LOGLEV = 3 | LOGLEV = 4
  1804.  then do
  1805.   if LANG='ESPAÑOL' Then Address Command('echo >>t:logyamnet.tmp "                        'espan'"')
  1806.   if LANG='ENGLISH' Then Address Command('echo >>t:logyamnet.tmp "                        'engli'"')
  1807.  end
  1808. RETURN
  1809.  
  1810. EXIT
  1811.  
  1812. MAXTextos:
  1813.  parse arg signo , espan , engli
  1814.  sdt = ' 'signo' 'date()' 'time()'  '
  1815.  IF LOGLEV = 1 | LOGLEV = 4
  1816.  then do
  1817.   if LANG='ESPAÑOL' Then Say sdt||espan
  1818.   if LANG='ENGLISH' Then Say sdt||engli
  1819.  end
  1820.  IF LOGLEV = 2 | LOGLEV = 4
  1821.  then do
  1822.   if LANG='ESPAÑOL' Then Address Command('echo >>t:logyamnet.tmp "'sdt||espan'"')
  1823.   if LANG='ENGLISH' Then Address Command('echo >>t:logyamnet.tmp "'sdt||engli'"')
  1824.  end
  1825. RETURN
  1826.  
  1827. EXIT
  1828.  
  1829. MODPREFS:
  1830.  
  1831.  IF Upper(LANG) = 'ESPAÑOL' then mesp = '¿Método de codificación para el link: 'ultimo':'elnez'/'oligoelemento'.'raspuntin'?'
  1832.  IF Upper(LANG) = 'ENGLISH' then mesp = 'Encode method for link: 'ultimo':'elnez'/'oligoelemento'.'raspuntin'?'
  1833.  metodo = rtezrequest(mesp, "MIME|PGP|UUIN|FSCODE", ' YamNet PREFS V3.07')
  1834.  if metodo = 1 then UUMOD.nodos = 'MIME'
  1835.  if metodo = 2 then UUMOD.nodos = 'PGP'
  1836.  if metodo = 3 then UUMOD.nodos = 'UUIN'
  1837.  if metodo = 0 then UUMOD.nodos = 'FSCODE'
  1838.  IF Upper(LANG) = 'ESPAÑOL' then aquies = '¿Nombre a quien van dirigidos los mensajes PGP del link?'
  1839.  IF Upper(LANG) = 'ENGLISH' then aquies = 'Name to use in PGP messages addressed to this link?'
  1840.  if metodo = 2 then TOPGP.nodos = '"'rtgetstring("",aquies," YamNet PREFS V3.07")'"'
  1841.  
  1842. RETURN
  1843.  
  1844. PMODPREFS:
  1845.  
  1846.  IF Upper(LANG) = 'ESPAÑOL' then mesp = '¿Método de codificación para el link: 'ELNO.nodos'?'
  1847.  IF Upper(LANG) = 'ENGLISH' then mesp = 'Encode method for link: 'ultimo':'elnez'/'oligoelemento'.'raspuntin'?'
  1848.  metodo = rtezrequest(mesp, "MIME|PGP|UUIN|FSCODE", ' YamNet PREFS V3.07')
  1849.  if metodo = 1 then UUMOD.nodos = 'MIME'
  1850.  if metodo = 2 then UUMOD.nodos = 'PGP'
  1851.  if metodo = 3 then UUMOD.nodos = 'UUIN'
  1852.  if metodo = 0 then UUMOD.nodos = 'FSCODE'
  1853.  IF Upper(LANG) = 'ESPAÑOL' then aquies = '¿Nombre a quien van dirigidos los mensajes PGP del link?'
  1854.  IF Upper(LANG) = 'ENGLISH' then aquies = 'Name to use in PGP messages addressed to this link?'
  1855.  if metodo = 2 then TOPGP.nodos = '"'rtgetstring("",aquies," YamNet PREFS V3.07")'"'
  1856.  
  1857. RETURN
  1858. EXIT
  1859.  
  1860. Lasvaris:
  1861.  
  1862. elcerr = CRC32(renpakter)
  1863. elrenom = filepart(renpakter)
  1864. RETURN
  1865.  
  1866. EXIT
  1867.  
  1868. AnteSalir:
  1869.  
  1870. if exists(temp'YamNet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  1871.  
  1872. if deteta = 0
  1873. then do
  1874.  If exists(TEMP'YamNet.Safe')
  1875.  then do
  1876.   if borros = 1
  1877.   then do
  1878.    elcomando = "echo >>"||TEMP||"YamNet.SAFE Rx 'ADDRESS YAM("
  1879.    otro = elcomando'"setfolder 0")'
  1880.    Address Command(otro"'")
  1881.    elcomando = "echo >>"||TEMP||"YamNet.SAFE Rx 'ADDRESS YAM("
  1882.    otro = elcomando'"mailupdate")'
  1883.    Address Command(otro"'")
  1884.   end
  1885.   Address Command('echo >>'TEMP'YamNet.SAFE Run Delete 'TEMP'YamNet.SAFE')
  1886.   Call Textos('&' , 'SAFE: ha generado el fichero ['TEMP'YamNet.SAFE]' , 'SAFE: has generated file ['TEMP'YamNet.SAFE]')
  1887.   Address Command('type 'TEMP'YamNet.SAFE')
  1888.  end
  1889. end
  1890.  
  1891. Call Textos('!' , 'Proceso terminado.' , 'Process ended.')
  1892. Address Command('type >>'LOGFIL' t:logyamnet.tmp')
  1893. Call Delete('t:logyamnet.tmp')
  1894. RETURN
  1895.  
  1896. EXIT
  1897.  
  1898. IniSafe:
  1899.  
  1900. if ~exists(TEMP'YamNet.SAFE')
  1901. then do
  1902.  IF UPPER(LANG) = 'ESPAÑOL' then Address Command('echo >'TEMP'YamNet.SAFE ";['TEMP'YamNet.SAFE] - Ejecuta esto antes de volver a usar YamNet"')
  1903.  IF UPPER(LANG) = 'ENGLISH' then Address Command('echo >'TEMP'YamNet.SAFE ";['TEMP'YamNet.SAFE] - Execute this before use YamNet again"')
  1904.  Address Command('echo >>'TEMP'YamNet.SAFE ""')
  1905.  Address Command('echo >>'TEMP'YamNet.SAFE Failat 21')
  1906. end
  1907. RETURN
  1908.  
  1909. EXIT
  1910.  
  1911. HacerRecibo:
  1912.  
  1913.  IF UPPER(LANG) = 'ESPAÑOL'
  1914.  then do
  1915.   Address Command('echo >t:compyam "Este mensaje confirma que ha sido"')
  1916.   Address Command('echo >>t:compyam "correctamente procesado, el fichero:"')
  1917.   Address Command('echo >>t:compyam "'fiche'"')
  1918.   Address Command('echo >>t:compyam "CRC32: 'tnu'"')
  1919.  end
  1920.  IF UPPER(LANG) = 'ENGLISH'
  1921.  then do
  1922.   Address Command('echo >t:compyam "This message is to confirm that have been"')
  1923.   Address Command('echo >>t:compyam "correctly processed, the file:"')
  1924.   Address Command('echo >>t:compyam "'fiche'"')
  1925.   Address Command('echo >>t:compyam "CRC32: 'tnu'"')
  1926.  end
  1927.  Address Command('echo >>t:compyam " "')
  1928.  Address Command('echo >>t:compyam " YamNet VER: 3.07 by Alfredo Soro (31 Dic 1996 - 04:00)"')
  1929.  ADDRESS YAM
  1930.  if NOHIDE = 0 then Hide
  1931.  MailWrite
  1932.  writemailto word(vienede,words(vienede))
  1933.  COMPROSUBJE = '"RECIBI: 'word(subje,1)' 'fiche' 'tnu'"'
  1934.  'writesubject 'COMPROSUBJE
  1935.  writeletter 't:compyam'
  1936.  writequeue
  1937.  Address Command('ECHO >ENV:YAMCHECK "Receipt(s) Ready to LAUNCH"')
  1938.  Call Delete('t:compyam')
  1939. RETURN
  1940. EXIT
  1941.  
  1942. Reenviacepta:
  1943.  
  1944. if ~exists('YAM:YamNet.dat')
  1945. then do
  1946.  Call Textos('X' , 'Petición de RE-ENVIO erronea. YamNet.dat no existe.' , 'RESEND Request error. YamNet.dat not found')
  1947. end
  1948.  
  1949. if exists('YAM:YamNet.dat')
  1950. then do
  1951.  rechazo = 1
  1952.  anelrre = elrre
  1953.  GetMailInfo FIL
  1954.  remofichero = RESULT
  1955.  GetMailInfo FRO
  1956.  removiene = RESULT
  1957.  parse var removiene '<'nmcadena'>'
  1958.  if nmcadena = '' then nmcadena = removiene
  1959.  removiene = nmcadena
  1960.  LADI = removiene
  1961.  SUBREMA = word(subje,3)' 'word(subje,4)' 'word(subje,6)
  1962.  remonombre = word(subje,4)
  1963.  recinombre = 'NULL'
  1964.  recitama = 'NULL'
  1965.  Call Textos('+' , 'Recibida petición de reenvio de: 'remonombre'' , 'Received resend request of: 'remonombre'')
  1966.  remocerr = word(subje,5)
  1967.  
  1968.  Call Open('YND','YAM:YamNet.dat','R')
  1969.  prima = readln('YND') 
  1970.  drop sesecu.
  1971.  sesecunu = 0
  1972.  sesecumbi = 0
  1973.  do until EOF('YND')
  1974.   sesecunu = sesecunu + 1
  1975.   nmet = readln('YND')
  1976.   sesecu.sesecunu = nmet
  1977.   if word(nmet,3) = word(subje,3) & word(nmet,4) = remonombre & word(nmet,6) = remocerr & word(nmet,7) = removiene
  1978.   then do
  1979.    rechazo = 0
  1980.    CALL REMANFICHERO
  1981.    sesecu.sesecunu = word(nmet,1)+1' 'date("b")' 'subword(nmet,3)
  1982.    sesecumbi = 1
  1983.   end 
  1984.  end
  1985.  
  1986.  Call CLOSE('YND')
  1987.  if sesecumbi = 1
  1988.  then do
  1989.   Call open('YWN','YAM:YamNet.dat','W')
  1990.   Call WriteLN('YWN',prima)
  1991.   do secusecu = 1 to sesecunu
  1992.    if sesecu.secusecu ~= '' then Call WriteLN('YWN',sesecu.secusecu)
  1993.   end
  1994.   Call Close('YWN')
  1995.  end
  1996.  
  1997.  if safe = 0
  1998.  then do
  1999.   Call Delete(remofichero)
  2000.   quesera = 1
  2001.   borros = 1
  2002.   elrre = elrre +1
  2003.   recinu.elrre = recio
  2004.   Call Textos('-' , 'Petición BORRADA.' , 'Request DELETED.')
  2005.  end
  2006.  if safe ~= 0
  2007.  then do
  2008.   Call IniSafe
  2009.   Address Command('echo >>'TEMP'YamNet.SAFE "delete 'remofichero'"')
  2010.  end
  2011. end
  2012. if rechazo = 1 then call Textos('#' , 'Imposible Re-Enviar! Fichero original no encontrado' , 'Original file not found. Re-Sending impossible!')
  2013. RETURN
  2014.  
  2015. EXIT
  2016.  
  2017. HazResendReq:
  2018.  
  2019.  IF UPPER(LANG) = 'ESPAÑOL'
  2020.  then do
  2021.   Address Command('echo >t:compyam "Este mensaje avisa de que ha sido"')
  2022.   Address Command('echo >>t:compyam "incorrectamente recibido, el fichero:"')
  2023.   Address Command('echo >>t:compyam "'word(subje,2)'"')
  2024.   Address Command('echo >>t:compyam "CRC32: 'word(subje,3)'"')
  2025.  end
  2026.  IF UPPER(LANG) = 'ENGLISH'
  2027.  then do
  2028.   Address Command('echo >t:compyam "This message announces that have been"')
  2029.   Address Command('echo >>t:compyam "uncorrectly received, the file:"')
  2030.   Address Command('echo >>t:compyam "'word(subje,2)'"')
  2031.   Address Command('echo >>t:compyam "CRC32: 'word(subje,3)'"')
  2032.  end
  2033.  Address Command('echo >>t:compyam " "')
  2034.  Address Command('echo >>t:compyam " YamNet VER: 3.07 by Alfredo Soro (31 Dic 1996 - 04:00)"')
  2035.  ADDRESS YAM
  2036.  IF NOHIDE = 0 then Hide
  2037.  MailWrite
  2038.  writemailto word(vienede,words(vienede))
  2039.  COMPROSUBJE = '"Resend Request: 'word(subje,1)' 'word(subje,2)' 'word(subje,3)'"'
  2040.  'writesubject 'COMPROSUBJE
  2041.  writeletter 't:compyam'
  2042.  writequeue
  2043.  Address Command('ECHO >ENV:YAMCHECK "Receipt(s) Ready to LAUNCH"')
  2044.  Call Delete('t:compyam')
  2045. RETURN
  2046. EXIT
  2047.  
  2048. REMANFICHERO:
  2049.  
  2050. if exists(OUTBO'YamNet/'remocerr||remonombre)
  2051. then do
  2052.  if exists(OUTBO'YamNet/'remonombre) then call Delete(OUTBO'YamNet/'remonombre)
  2053.  address command('rename "'OUTBO'YamNet/'remocerr||remonombre'" "'OUTBO'YamNet/'remonombre'"')
  2054.  numetodo = ''
  2055.  nmetnu = 0
  2056.  aeio = 0
  2057.  Do until numetodo ~= '' | aeio = 1
  2058.   nmetnu = nmetnu + 1
  2059.   if LADRE.nmetnu = removiene then numetodo = UUMOD.nmetnu
  2060.   if nmetnu = nodos then aeio = 1
  2061.  end
  2062.  
  2063.  if numetodo = 'UUIN'
  2064.  then do
  2065.   renumeter = remonombre
  2066.   elnuasi = TEMP'YamOut/'remonombre'.uaa'
  2067.   Call Makedir(TEMP'YamOut')
  2068.   IF UUENCODE(TEMP'YamOut/'remonombre,OUTBO'YamNet/'remonombre,,'S')
  2069.   then do
  2070.    elcerrece = CRC32(OUTBO'YamNet/'remonombre)
  2071.    nohayfallos = 0
  2072.    SUBREMA = SUBREMA' UUIN'
  2073.    Call Crealnuasi
  2074.   end
  2075.  end
  2076.  
  2077.  if numetodo = 'MIME'
  2078.  then do
  2079.   renumeter = remonombre
  2080.   elnuasi = TEMP'YamOut/'remonombre'.mime'
  2081.   if exists(TEMP'YamOut') then Address Command('delete >nil: 'TEMP'YamOut ALL QUIET NOREQ FORCE')
  2082.   Call Makedir(TEMP'YamOut')
  2083.   Address Command('base64encode >'TEMP'nore 'OUTBO'YamNet/'remonombre' 'elnuasi)
  2084.   Call Open('nore',TEMP'nore','R')
  2085.   nosenco = READLN('nore')
  2086.   Call Close('nore')
  2087.   Call Delete(TEMP'nore')
  2088.   if word(nosenco,2) = 'bytes' then elcerrece = CRC32(OUTBO'YamNet/'remonombre)
  2089.   nohayfallos = 0
  2090.   SUBREMA = SUBREMA' MIME'
  2091.   Call Crealnuasi
  2092.  end
  2093.  
  2094.  if numetodo = 'FSCODE'
  2095.  then do
  2096.   renumeter = remonombre
  2097.   elnuasi = TEMP'YamOut/'remonombre'.asc'
  2098.   if exists(TEMP'YamOut') then Address Command('delete >nil: 'TEMP'YamOut ALL QUIET NOREQ FORCE')
  2099.   Call Makedir(TEMP'YamOut')
  2100.   Address Command('c:fscode OUTBO'yamnet/'remonombre 'elnuasi' E')
  2101.   elcerrece = CRC32(OUTBO'YamNet/'remonombre)
  2102.   nohayfallos = 0
  2103.   SUBREMA = SUBREMA' FSCODE'
  2104.   Call Crealnuasi
  2105.  end
  2106.  
  2107.  if numetodo = 'PGP'
  2108.  then do
  2109.   renumeter = remonombre
  2110.   elnuasi = OUTBO'YamNet/'remonombre'.asc'
  2111.   if exists(TEMP'YamOut') then Address Command('delete >nil: 'TEMP'YamOut ALL QUIET NOREQ FORCE')
  2112.   Call Makedir(TEMP'YamOut')
  2113.  
  2114.   if exists('env:PGPPATH')
  2115.   then do
  2116.    call open('ppa','env:pgppath','R')
  2117.    elppa = readln('ppa')
  2118.    Call Close('ppa')
  2119.    if right(elppa,1) ~= ':' & right(elppa,1) ~= '/' then elppa = elppa||'/'
  2120.    if LANG='ESPAÑOL' then Address Command(elppa'PGP >NIL: -ea "+comment=Correo de la Red: 'word(subje,3)'" 'remonombre' 'TOPGP.nmetnu)
  2121.    if LANG='ENGLISH' then Address Command(elppa'PGP >NIL: -ea "+comment=Mail from the net: 'word(subje,3)'" 'remonombre' 'TOPGP.nmetnu)
  2122.    elcerrece = CRC32(OUTBO'YamNet/'remonombre)
  2123.   end
  2124.   if ~exists('env:PGPPATH')
  2125.   then do
  2126.    if LANG='ESPAÑOL' then Address Command('PGP >NIL: -ea "+comment=Correo de la Red: 'word(subje,3)'" 'remonombre' 'TOPGP.nmetnu)
  2127.    if LANG='ENGLISH' then Address Command('PGP >NIL: -ea "+comment=Mail from the net: 'word(subje,3)'" 'remonombre' 'TOPGP.nmetnu)
  2128.    elcerrece = CRC32(OUTBO'YamNet/'remonombre)
  2129.   end
  2130.   nohayfallos = 0
  2131.   SUBREMA = SUBREMA' PGP'
  2132.   Call Crealnuasi
  2133.  end
  2134.  
  2135.  if nohayfallos = 1
  2136.  then do
  2137.   if numetodo = 'UUIN' then elmodete = 'UUIN'
  2138.   Escring:
  2139.   ELYAM = 'Escring'
  2140.   SIGNAL ON SYNTAX
  2141.   IF NOHIDE = 0 then HIDE
  2142.   MailWrite
  2143.   writemailto LADI
  2144.   'writesubject 'SUBREMA
  2145.   writeletter elnuasi
  2146.   writequeue
  2147.   Address Command('ECHO >ENV:YAMCHECK "Message(s) Ready to LAUNCH"')
  2148.   Call Delete(elnuasi)
  2149.   address command('rename "'OUTBO'YamNet/'remonombre'" "'OUTBO'YamNet/'remocerr||remonombre'"')
  2150.  end
  2151. end
  2152. RETURN
  2153.  
  2154. Crealnuasi:
  2155.  
  2156.  if exists(elnuasi)
  2157.  then do
  2158.   nohayfalos = 1
  2159.   address command('echo >>'elnuasi' " "')
  2160.   address command('echo >>'elnuasi' "-- "')
  2161.   address command('echo >>'elnuasi' ""')
  2162.   IF UPPER(LANG) = 'ESPAÑOL' then Address Command('echo >>'elnuasi' "--- Re-Enviado con YamNet V3.07 - Alfredo Soro (31 Dic 96 - 04:00)"')
  2163.   IF UPPER(LANG) = 'ENGLISH' then Address Command('echo >>'elnuasi' "--- Re-Sent with YamNet V3.07 - Alfredo Soro (31 Dic 96 - 04:00)')
  2164.   if LANG = 'ESPAÑOL' then Address Command('echo >t:joi "Correo de la Red: 'word(subje,3)'"')
  2165.   if LANG = 'ENGLISH' then Address Command('echo >t:joi "Mail from network: 'word(subje,3)'"')
  2166.   Address Command('echo >>t:joi " "')
  2167.   Address Command('Join t:joi 'elnuasi' AS='TEMP'joined')
  2168.   Call Delete('T:Joi')
  2169.   Address command('Copy 'TEMP'joined 'elnuasi' QUIET')
  2170.   Call Delete(TEMP'joined')
  2171.  end
  2172. RETURN
  2173.  
  2174. CONVIDENTRO:
  2175.  
  2176. Drop eltruco.
  2177. Call Textos('°' , 'Sustituyendo signos del mensaje por puntos' , 'Replacing message characters to points')
  2178. Call Readfile(fichero,'eltruco')
  2179. croa = 0
  2180. drop elnuevo.
  2181. elnuevo.0 = eltruco.0
  2182. do until croa = eltruco.0
  2183.  croa = croa +1
  2184.  elnuevo.croa = translate(eltruco.croa,'.','°')
  2185. end
  2186. call writefile(fichero,'elnuevo')
  2187. borros = 1
  2188. RETURN
  2189. EXIT
  2190.  
  2191. DEMAILEA:
  2192.  
  2193.  Call Textos('!' , 'Reconvirtiendo ISO-8859-1 a Latin normal de Amiga' , 'Re-converting ISO-8859-1 to normal Amiga Latin chars')
  2194.  autenfichero = fichero
  2195.  Call Makedir(TEMP'YamConv')
  2196.  fichero = TEMP'YamConv/'FILEPART(autenfichero)
  2197.  otrofichero = TEMP'YamConv/'FILEPART(autenfichero)'.lat'
  2198.  Call open('aufi',autenfichero,'R')
  2199.  Call open('ficu',otrofichero,'W')
  2200.  
  2201.  CALL LOMISMO
  2202.  
  2203.  Call close('aufi')
  2204.  Call close('ficu')
  2205.  
  2206.  Call open('lufi',otrofichero,'R')
  2207.  Call open('ficu',fichero,'W')
  2208.  do until eof('lufi')
  2209.   anda = readch('lufi',5000)
  2210.   if right(anda,1) = '=' then anda = anda||readch('lufi',2)
  2211.   if right(anda,1) = '=' then anda = anda||readch('lufi',2)
  2212.   if right(anda,2) = '=2' | right(anda,2) = '=3' then anda = anda||readch('lufi',1)
  2213.   andb = replace('.','=2E',anda)
  2214.   andc = replace('=','=3D',andb)
  2215.   call writech('ficu',andc)
  2216.  end
  2217.  Call Close('ficu')
  2218.  Call Close('lufi')
  2219.  Call Delete(otrofichero)
  2220.  
  2221.  IF LOGLEV = 4 then address command('echo "'atra'" NOLINE')
  2222.  
  2223. RETURN
  2224.  
  2225. EXIT
  2226.  
  2227. LOMISMO:
  2228.  
  2229.  suma = 0
  2230.  convd = ''
  2231.  alemo = 0
  2232.  ale = 0
  2233.  nue = 0
  2234.  
  2235.  IF LOGLEV = 4 then address command('echo " " NOLINE')
  2236.  
  2237.  do until eof('aufi')
  2238.   if suma = 0 then conva = readln('aufi')
  2239.   if suma = 1 then conva = convb||readln('aufi')
  2240.   convb = conva
  2241.   if suma = 0 & right(conva,1) = '=' then convb = left(conva,length(conva)-1)
  2242.   if convb = conva
  2243.   then do
  2244.    Call writeln('ficu',convb)
  2245.    suma = 0
  2246.    alemo = alemo + 1
  2247.   end
  2248.   if convb ~= conva
  2249.   then do
  2250.    suma = 1
  2251.   end
  2252.  
  2253.   IF alemo > 250 & right(alemo/2,2) ~= '.5' & LOGLEV = 4
  2254.   then do
  2255.    if ale = 0 & nue = 0
  2256.    then do
  2257.     address command('echo "'atra'|" NOLINE')
  2258.     ale = 1
  2259.     nue = 1
  2260.    end
  2261.    if nue = 0 & ale = 1
  2262.    then do
  2263.     address command('echo "'atra'-" NOLINE')
  2264.     ale = 0
  2265.    end
  2266.    nue = 0
  2267.   end
  2268.  end
  2269.  
  2270.  if suma = 1 then Call writeln('ficu',convb)
  2271.  
  2272.  
  2273. RETURN
  2274.  
  2275. EXIT
  2276.  
  2277. INFIERNA:
  2278.  
  2279.  if exists('YAM:YamNet.dat')
  2280.  then do
  2281.   Call Textos('#' , 'Comprobando RECIBIs' , 'Checking 'RECIBI' Receipts')
  2282.   SIGNAL ON SYNTAX
  2283.   ADDRESS YAM
  2284.   setfolder 0
  2285.   SIGNAL OFF SYNTAX
  2286.   GetFolderInfo MAX
  2287.   datos = RESULT
  2288.   DROP emoviene.
  2289.   DROP emofichero.
  2290.   DROP emonombre.
  2291.   DROP emocerr.
  2292.   DROP emosubje.
  2293.   reborros = 0
  2294.   inicial = 0
  2295.   inicial = inicial - 1
  2296.   Do li=0 to datos-1
  2297.    nohacer = 0
  2298.    setfolder 0
  2299.    ellibo = (datos-1)-li
  2300.    SetMail ellibo
  2301.    GetMailInfo SUB
  2302.    subje = RESULT
  2303.    GetMailInfo FRO
  2304.    Vienede = RESULT
  2305.    if left(subje,7) = 'RECIBI:'
  2306.    then do
  2307.     inicial = inicial + 1
  2308.     GetMailInfo FIL
  2309.     emofichero.inicial = RESULT
  2310.     GetMailInfo FRO
  2311.     emoviene.inicial = RESULT
  2312.     emonombre.inicial = word(subje,3)
  2313.     Call Textos('+' , 'Recibido comprobante por el fichero: 'emonombre.inicial , 'Received receipt for the file: 'emonombre.inicial)
  2314.     emocerr.inicial = word(subje,4)
  2315.     emosubje.inicial = word(subje,2)
  2316.    end
  2317.   end
  2318.   recisbis = 0
  2319.   if inicial ~= -1
  2320.   then do
  2321.    call open('YRD','YAM:YamNet.dat','R') 
  2322.    laprima = ReadLN('YRD')
  2323.    secambios = 0
  2324.    elrre = 0
  2325.    puli = 0
  2326.    DROP quesito.
  2327.    Do until eof('YRD')
  2328.     nocompro = 0
  2329.     secureci = readln('YRD')
  2330.     quesilova = 1
  2331.     if datatype(word(secureci,1),'N')   
  2332.     then do
  2333.      paratese = 0
  2334.      aye = -1
  2335.      do until paratese = 1
  2336.       aye = aye + 1
  2337.       parse var emoviene.aye '<'nmcadena'>'
  2338.       if nmcadena = '' then nmcadena = emoviene.aye
  2339.       aladi = nmcadena
  2340.       if word(secureci,6) = emocerr.aye & word(secureci,4) = emonombre.aye & word(secureci,3) = emosubje.aye & word(secureci,7) = aladi
  2341.       then do
  2342.        quesilova = 0
  2343.        secambios = 1
  2344.        recisbis = recisbis + 1
  2345.        Call Delete(emofichero.aye)
  2346.        Call Delete(OUTBO'YamNet/'emocerr.aye||emonombre.aye)
  2347.        reborros = 1
  2348.        Call Textos('#' , 'Comprobante y archivo original: BORRADOS.' , 'Receipt and original file: DELETED.')
  2349.        paratese = 1
  2350.       end
  2351.       if aye = inicial then paratese = 1
  2352.      end
  2353.     end 
  2354.     if quesilova = 1
  2355.     then do
  2356.      puli = puli + 1
  2357.      quesito.puli = secureci
  2358.     end
  2359.    end
  2360.    Call Close('YRD')
  2361.    if secambios = 1
  2362.    then do
  2363.     Call Open('YTD','Yam:YamNet.dat','W')
  2364.     Call WriteLN('YTD',laprima)
  2365.     do sssecu = 1 to puli
  2366.      if quesito.sssecu ~= '' then Call WriteLN('YTD',quesito.sssecu)
  2367.     end
  2368.     Call Close('YTD')
  2369.    end
  2370.    if reborros = 1
  2371.    then do
  2372.     setfolder 0
  2373.     mailupdate
  2374.    end
  2375.   end
  2376.   if (inicial+1)-recisbis ~= 0 then Call Textos('#' , (inicial+1)-recisbis' Ficheros de RECIBI no se encontraron' , (inicial+1)-recisbis' files of receipts were not found')
  2377.   Call MAXTextos('!' , recisbis' ficheros con su recibi BORRADOS.' , recisbis' files with its receipt DELETED.')
  2378.  end
  2379.  
  2380. RETURN
  2381. EXIT
  2382.  
  2383. BORRAPORFECHA:
  2384.  
  2385. tercuss = 0
  2386. DROP ternued.
  2387.  
  2388. If exists('YAM:YamNet.dat')
  2389. then do
  2390.  tercubo = 0
  2391.  Call Open('YBF','Yam:YamNet.dat','R')
  2392.  primepa = ReadLN('YBF')
  2393.  cams = 0
  2394.  do until EOF('YBF')
  2395.   secupa = ReadLN('YBF')
  2396.   recam = 0
  2397.   if datatype(word(secupa,2),'N')
  2398.   then do
  2399.    multipud = 0
  2400.    remola = 0
  2401.    if datatype(word(secupa,1),'N') then multipud = word(secupa,1)
  2402.    if multipud ~= 0 then remola = multipud*remanda
  2403.    if (word(secupa,2)+reborra)-remola <= rehoy
  2404.    then do
  2405.     cams = 1
  2406.     recam = 1
  2407.     if safe = 0
  2408.     then do
  2409.      tercubo = tercubo + 1
  2410.      Call Delete(OUTBO'YamNet/'word(secupa,6)||word(secupa,4))
  2411.      Call Textos('-' , 'Borrado fichero 'word(secupa,6)' por antigudad' , 'Deleted file 'word(secupa,6)' by age')
  2412.     end
  2413.     if safe = 1
  2414.     then do
  2415.      Call IniSafe
  2416.      Address command('Echo 'TEMP'YamNet.SAFE "delete 'OUTBO'YamNet/'word(secupa,6)||word(secupa,4)'"')
  2417.      Call Textos('-' , 'Simulado borrado de fichero 'word(secupa,6)'' , 'Simulated deleting of file 'word(secupa,6)'')
  2418.     end
  2419.    end 
  2420.    if recam = 0
  2421.    then do
  2422.     tercuss = tercuss + 1
  2423.     ternued.tercuss = secupa
  2424.    end
  2425.   end
  2426.  end
  2427.  Call Close('YBF')
  2428.  if cams = 1
  2429.  then do
  2430.   Call Open('NYD','YAM:YamNet.dat','W')
  2431.   Call WriteLN('NYD',primepa)
  2432.   do tertercu = 1 to tercuss
  2433.    if ternued.tertercu ~= '' then Call WriteLN('NYD',ternued.tertercu)
  2434.   end
  2435.   Call Close('NYD')
  2436.  end
  2437.  Call Textos('+', 'Borrados 'tercubo' ficheros almacenados por antiguedad' , 'Deleted 'tercubo' stored files by age')
  2438. end
  2439.  
  2440. RETURN
  2441. EXIT
  2442.  
  2443. INFIERNO:
  2444.  
  2445.  Call BORRAPORFECHA
  2446.  Call INFIERNA
  2447.  SIGNAL ON SYNTAX
  2448.  setfolder 2
  2449.  Call Textos('+', 'Purgando correo enviado' , 'Purging sent mail')
  2450.  SIGNAL OFF SYNTAX
  2451.  GetFolderInfo MAX
  2452.  tercudatos = RESULT
  2453.  refilis = 0
  2454.  purgados =  0
  2455.  call OZONADOR
  2456.  do tercua = 0 to tercudatos-1
  2457.   setfolder 2
  2458.   setmail tercua
  2459.   getmailinfo SUB
  2460.   tercusub = RESULT
  2461.   if left(tercusub,7) = 'RECIBI:' | left(tercusub,15) = 'Resend Request:'
  2462.   then do
  2463.    GetMailInfo FIL
  2464.    tercufil = RESULT
  2465.    IF SAFE = 0
  2466.    then do
  2467.     Call Delete(tercufil)
  2468.     purgados = purgados + 1
  2469.     Call Textos('-' , 'Borrado viejo recibo o peticion de reenvio' , 'Deleted old sent receipt or resending request')
  2470.     borros = 1  
  2471.    end
  2472.    if safe ~= 0
  2473.    then do
  2474.     Call Inisafe
  2475.     Address Command('echo >>'TEMP'YamNet.SAFE "delete 'tercufil'"')
  2476.     purgados = purgados + 1
  2477.     Call Textos('-' , 'SIMULADO borrado viejo recibo o peticion de reenvio' , 'Simulating that receipt or resend request is deleted')
  2478.    end
  2479.   end
  2480.   if upper(word(tercusub,1)) ~= 'RE:'
  2481.   then do
  2482.    nomastercu = 0
  2483.    tercuuu = 0
  2484.    do until nomastercu = 1
  2485.     tercuuu = tercuuu + 1
  2486.     if word(tercusub,1) = tercuz.tercuuu
  2487.     then do
  2488.      GetMailInfo Fil
  2489.      tercufilu = RESULT
  2490.      refilis = refilis + 1
  2491.      if safe = 0
  2492.      then do
  2493.       borros = 1
  2494.       Call Delete(tercufilu)
  2495.       Call Textos('#' , 'Fichero ya enviado BORRADO.' , 'DELETED already sent File.')
  2496.       nomastercu = 1
  2497.      end
  2498.      if safe ~= 0
  2499.      then do
  2500.       borros = 1
  2501.       Address Command('echo >>'TEMP'YamNet.SAFE "delete 'tercufilu'"')
  2502.       Call Textos('#' , 'Simulado borrado de fichero ya enviado.' , 'Simulated DELETING of already sent File.')
  2503.       nomastercu = 1
  2504.      end
  2505.     end
  2506.     if tercuuu = tercun then nomastercu = 1
  2507.    end
  2508.   end
  2509.  end
  2510.  Call Textos('-' , 'BORRADOS 'purgados' recibos o requests y 'refilis' ficheros ya enviados' , 'DELETED 'purgados' receipts or requests & 'refilis' bundles already sent')
  2511.  
  2512. RETURN
  2513.  
  2514. OZONADOR:
  2515.  
  2516.  terka = 0
  2517.  tercun = 0
  2518.  DROP tercuz.
  2519.  do tercue = 1 to zonas
  2520.   ui = SUBJ.tercue
  2521.   nolotercu = 0
  2522.   do tercucu = 1 to tercun
  2523.    if tercuz.tercucu = ui then nolotercu = 1
  2524.   end
  2525.   if nolotercu = 0
  2526.   then do
  2527.    tercun = tercun + 1
  2528.    tercuz.tercun = ui
  2529.   end
  2530.  end
  2531. RETURN
  2532.  
  2533. EXIT
  2534.  
  2535. YAMUDT:
  2536.  
  2537. Call Textos('!' , 'Mensaje generado con vieja version de YamNet' , 'Message generated with old version of YamNet')
  2538. Call MAXTextos('%' , 'Intentandolo con FSCode' , 'Trying it with FSCode')
  2539.  
  2540. if exists(TEMP'YamNet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  2541. if ~exists(TEMP'YamNet') then Call Makedir(TEMP'YamNet')
  2542. dirname = TEMP'YamNet'
  2543. olddir = pragma('d', dirname)
  2544.  
  2545. if searchpattern(fichero,'°') ~= -1 then Call CONVIDENTRO
  2546.  
  2547. Address Command('echo >'TEMP'yach `c:FSCODE 'fichero'`')
  2548. Call pragma('d', olddir)
  2549. call open('tyac',TEMP'yach','R')
  2550. lalalala = readln('tyac')
  2551. call close('tyac')
  2552. call delete(TEMP'yach')
  2553. if right(lalalala,13) = 'no start line'
  2554. then do
  2555.  if exists(TEMP'YamNet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  2556.  Call Makedir(TEMP'YamNet')
  2557.  Call MAXTextos('%' , 'Intentandolo con MIME' , 'Trying it with MIME')
  2558.  Address Command('base64decode >'TEMP'yare 'fichero' 'TEMP'yamnet')
  2559.  Call open('yare',TEMP'yare','R')
  2560.  nuevo = 0
  2561.  larespu = readln('yare') if word(larespu,2) = 'bytes' then nuevo = 1
  2562.  if larespu = 'No filename found in MIME header' then nuevo = 0
  2563.  Call Close('yare')
  2564.  Call Delete(TEMP'Yare')
  2565.  if nuevo = 0 then if ~exists(TEMP'yamnet/'word(subje,2)) THEN nuevo = 1
  2566.  if nuevo ~= 0
  2567.  then do
  2568.   if exists(TEMP'YamNet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  2569.   Call Makedir(TEMP'YamNet')
  2570.   nuevo = 1
  2571.   Call MAXTextos('%' , 'Intentandolo con UUDECODE()' , 'Trying it with UUDECODE()')
  2572.   If UUDECODE(fichero,TEMP'YamNet') then nuevo = 0
  2573.  
  2574.   if nuevo = 0 then if ~exists(TEMP'yamnet/'word(subje,2)) THEN nuevo = 1
  2575.   if nuevo ~= 0
  2576.   then do
  2577.    if exists(TEMP'YamNet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  2578.    Call Makedir(TEMP'YamNet')
  2579.    dirname = TEMP'YamNet'
  2580.    olddir = pragma('d', dirname)
  2581.    elppa = ''
  2582.    Address Command('which >'TEMP'YamNetPGP PGP')
  2583.    if READFILE(TEMP'YamNetPGP','mipgp')
  2584.    then do
  2585.     if mipgp.0 > 0 then elppa = left(mipgp.1,length(mipgp.1)-3)
  2586.     IF mipgp.0 = 0 then elppa = ''
  2587.    end
  2588.    Call Delete(TEMP'YamNetPGP')
  2589.    if exists('env:PGPPATH')
  2590.    then do
  2591.     call open('ppa','env:pgppath','R')
  2592.     elppa = readln('ppa')
  2593.     Call Close('ppa')
  2594.     if right(elppa,1) ~= ':' & right(elppa,1) ~= '/' then elppa = elppa||'/'
  2595.    end
  2596.    if elppa = '' then Call Textos('#' , 'ERROR: PGP No instalado!!' , 'ERROR: PGP not installed!!')
  2597.    Call MAXTextos('%' , 'Intentandolo con PGP' , 'Trying it with PGP')
  2598.    Address Command(elppa'PGP -p >nil: 'fichero)
  2599.    elopo = RC
  2600.    Call pragma('d', olddir)
  2601.    nohacer = 0
  2602.    if elopo ~= 0 then nohacer = 1
  2603.   end
  2604.  end
  2605. end
  2606.  
  2607. if exists(TEMP'yamnet')
  2608. then do
  2609.  Address Command('list >'TEMP'mirami 'TEMP'YamNet LFORMAT="%n %l"')
  2610.  call open('tmiram',TEMP'mirami','R')
  2611.  tmi = readln('tmiram')
  2612.  call close('tmiram')
  2613.  Call Delete(TEMP'mirami')
  2614.  tnu = word(tmi,2)
  2615.  fiche = word(tmi,1)
  2616.  if tnu = 'empty' then nohacer = 1
  2617.  if tnu ~= word(lared,3) & word(lared,3) ~= '' then nohacer = 1
  2618. end
  2619.  
  2620. if nohacer = 1
  2621. then do
  2622.  Call Textos('#' , 'Fallo en decodificacion. Pidiendo Re-Envio!' , 'Decoding Error. Requesting a Re-Sending')
  2623.  mopa = 0
  2624.  al = 0
  2625.  do until mopa = 1
  2626.   nomb = right('00'al,2)
  2627.   al = al + 1
  2628.   if ~exists(TEMP'YamNet.CHECK'nomb) then mopa = 1
  2629.  end
  2630.  Address Command('copy 'fichero' 'TEMP'YamNet.CHECK'nomb)
  2631.  if safe = 0
  2632.  then do
  2633.   Call Delete(fichero)
  2634.   borros = 1
  2635.  end
  2636.  if safe ~= 0
  2637.  then do
  2638.   Call IniSafe
  2639.   Address Command('echo >>'TEMP'YamNet.SAFE "delete 'fichero'"')
  2640.  end
  2641.  
  2642.  Call Textos('%' , 'Guarda el fichero ['TEMP'YamNet.CHECK'nomb'] para comparar' , 'Save the file ['TEMP'YamNet.CHECK'nomb'] to compare')
  2643.  call HazResendReq
  2644. end 
  2645.  
  2646. if nohacer = 2
  2647. then do
  2648.  mopa = 0
  2649.  al = 0
  2650.  do until mopa = 1
  2651.   nomb = right('00'al,2)
  2652.   al = al + 1
  2653.   if ~exists(TEMP'YamNet.CHECK'nomb) then mopa = 1
  2654.  end
  2655.  Address Command('copy 'fichero' 'TEMP'YamNet.CHECK'nomb)
  2656.  if safe = 0
  2657.  then do
  2658.   Call Delete(fichero)
  2659.   Call Textos('#' , 'Borrado mensaje sin fichero codificado' , 'Message without encoded file Deleted')
  2660.   borros = 1
  2661.  end
  2662.  if safe ~= 0
  2663.  then do
  2664.   Call IniSafe
  2665.   Address Command('echo >>'TEMP'YamNet.SAFE "delete 'fichero'"')
  2666.  end
  2667.  Call Textos('%' , 'Puedes examinar el mensaje en el fichero ['TEMP'YamNet.CHECK'nomb']' , 'You can look into the message in file ['TEMP'YamNet.CHECK'nomb']')
  2668. end 
  2669.  
  2670. if nohacer = 0
  2671. then do
  2672.  rnomb = fiche
  2673.  if exists(INBO||fiche)
  2674.  then do
  2675.   pi = 0
  2676.   parpar = 0
  2677.   do until parpar = 1
  2678.    pi = pi + 1
  2679.    rnomb = fiche||','pi
  2680.    if ~exists(INBO||rnomb) then parpar = 1
  2681.   end
  2682.  end
  2683.  
  2684.  Address Command('copy >NIL: 'TEMP'yamnet/'fiche' 'INBO||rnomb)
  2685.  Call Textos('<' , INBO||rnomb' ...preparado.' , INBO||rnomb' ...ready.')
  2686.  tama = tnu
  2687.  if tama ~= word(lared,3) then Call Textos('#' , '¡El fichero recibido fue generado con YamNet mas viejo!' , 'Received file was generated with older YamNet!')
  2688.  if exists(TEMP'YamNet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  2689.  
  2690.  IF LOGLEV = 1 | LOGLEV = 4
  2691.  then do
  2692.   e = 0
  2693.   quienes = ''
  2694.   do pompom = 1 to Nodos
  2695.    If upper(LADRE.pompom) = upper(word(vienede,1)) & left(ELNO.pompom,length(tadon)) = tadon then quienes = ELNO.pompom
  2696.   end
  2697.   if quienes = '' then quienes = word(vienede,words(vienede))
  2698.   IF UPPER(LANG) = 'ESPAÑOL' then say ' - 'date()' 'time()'  Desde: 'quienes' - CRC32: 'tama
  2699.   IF UPPER(LANG) = 'ENGLISH' then say ' - 'date()' 'time()'  From: 'quienes' - CRC32: 'tama
  2700.  end
  2701.  IF LOGLEV = 2 | LOGLEV = 4
  2702.  then do
  2703.   if LOGLEV = 2
  2704.   then do
  2705.    eee = 0
  2706.    pompom = 0
  2707.    do until eee = 1
  2708.     pompom = pompom + 1
  2709.     If upper(LADRE.pompom) = upper(word(vienede,1)) & left(ELNO.pompom,length(tadon)) = tadon
  2710.     then do
  2711.      quienes = ELNO.pompom
  2712.      eee = 1
  2713.     end
  2714.     if pompom = Nodos then eee = 1
  2715.    end
  2716.   end
  2717.   if quienes = '' then quienes = word(vienede,words(vienede))
  2718.   IF UPPER(LANG) = 'ESPAÑOL' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  Desde: 'quienes' - CRC32: 'tama'"')
  2719.   IF UPPER(LANG) = 'ENGLISH' then Address Command('echo >>t:logyamnet.tmp " - 'date()' 'time()'  From: 'quienes' - CRC32: 'tama'"')
  2720.  end
  2721.  
  2722.  Call HacerRecibo
  2723.  
  2724.  if safe = 0
  2725.  then do
  2726.   Call Delete(fichero)
  2727.   borros = 1
  2728.  end
  2729.  if safe ~= 0
  2730.  then do
  2731.   Call IniSafe
  2732.   Address Command('echo >>'TEMP'YamNet.SAFE "delete 'fichero'"')
  2733.  end
  2734. end
  2735. RETURN
  2736.  
  2737. EXIT
  2738.  
  2739. GENERADAT:
  2740.  
  2741. /* YamNet.dat generator ASL 26/11/96 */
  2742.  
  2743. Call Textos( '!', 'YAM:YamNet.dat Generator en proceso' , 'Generating YAM:YamNet.dat')
  2744. IF ~SHOW('Ports','YAM')
  2745. THEN DO
  2746.  Address Command('Run <NIL: >NIL: YAM:YAM')
  2747.  Address Command('WaitForPort YAM')
  2748. END
  2749.  
  2750. borros = 0
  2751. Call Ozonador
  2752.  
  2753. SIGNAL ON SYNTAX
  2754. ADDRESS YAM
  2755. setfolder 2
  2756. Getfolderinfo MAX
  2757. numer = RESULT
  2758. SIGNAL OFF SYNTAX
  2759. andaya = 0
  2760. sususus = -1
  2761. Do until andaya = 1
  2762.  sususus = sususus + 1
  2763.  setfolder 2
  2764.  setmail sususus
  2765.  getmailinfo SUB
  2766.  sujeto = RESULT
  2767.  if word(sujeto,1) ~= 'RE:'
  2768.  then do
  2769.   paparara = 0
  2770.   sumadero = 0
  2771.   do until paparara = 1
  2772.    sumadero = sumadero + 1
  2773.    if word(sujeto,1) = tercuz.sumadero
  2774.    then do
  2775.     call LAODISEA
  2776.     paparara = 1
  2777.    end
  2778.    if sumadero = tercun then paparara = 1
  2779.   end
  2780.  end
  2781.  if sususus = (numer - 1) then andaya = 1
  2782. end
  2783.  
  2784. if borros = 1
  2785. then do
  2786.  setfolder 2
  2787.  mailupdate
  2788. end
  2789.  
  2790. Call Textos('-', 'Proceso terminado' , 'Process ended')
  2791.  
  2792. RETURN
  2793.  
  2794. LAODISEA:
  2795.  
  2796.  Getmailinfo FIL
  2797.  ILFIC = RESULT
  2798.  
  2799.  fichero = ILFIC
  2800.  CALL DEMAILEA
  2801.  nuevo = 0
  2802.  if exists(TEMP'yamnet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  2803.  Call Makedir(TEMP'YamNet')
  2804.  dirname = TEMP'YamNet'
  2805.  olddir = pragma('d', dirname)
  2806.  
  2807.  IF word(sujeto,4) = 'UUIN'
  2808.  then do
  2809.   If UUDECODE(fichero,TEMP'YamNet') then nuevo = 1
  2810.   if nuevo = 1 & ~exists(TEMP'YamNet/'word(sujeto,2)) then nuevo = 0
  2811.  end
  2812.  IF word(sujeto,4) = 'FSCODE'
  2813.  then do
  2814.   Address Command('echo >'TEMP'yach `c:FSCODE 'fichero'`')
  2815.   nuevo = 1
  2816.   call open('tyac',TEMP'yach','R')
  2817.   lalalala = readln('tyac')
  2818.   call close('tyac')
  2819.   call delete(TEMP'yach')
  2820.   if right(lalalala,13) = 'no start line'
  2821.   then do
  2822.    if exists(TEMP'YamNet') then Address Command('delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  2823.    nuevo = 0
  2824.   end
  2825.  end
  2826.  
  2827.  IF word(sujeto,4) = 'MIME'
  2828.  then do
  2829.   address command('base64decode >'TEMP'yare 'fichero' 'TEMP'YamNet')
  2830.   Call open('yare',TEMP'yare','R')
  2831.   larespu = readln('yare')
  2832.   if word(larespu,2) = 'bytes' then nuevo = 1
  2833.   if larespu = 'No filename found in MIME header' then nuevo = 0
  2834.   Call Close('yare')
  2835.   Call Delete(TEMP'Yare')
  2836.   if nuevo = 1 then if ~exists(TEMP'yamnet/'word(sujeto,2)) THEN nuevo = 0
  2837.  end
  2838.  
  2839.  IF word(sujeto,4) = 'PGP'
  2840.  then do
  2841.   Call PREPEGEPE
  2842.   Address command(elppa'PGP -p >nil: 'fichero)
  2843.   elopo = RC
  2844.   nuevo = 1
  2845.   if elopo ~= 0 then nuevo = 0
  2846.  end
  2847.  
  2848.  Call pragma('d', olddir)
  2849.  
  2850.  if nuevo = 1
  2851.  then do
  2852.   if ~exists(OUTBO'YamNet') then Makedir(OUTBO'YamNet')
  2853.   address command('Copy >NIL: 'TEMP'YamNet/'word(sujeto,2)' 'OUTBO'YamNet/'CRC32(TEMP'YamNet/'word(sujeto,2))||word(sujeto,2))
  2854.   Call Creadat
  2855.   pakter = TEMP'YamNet/'word(sujeto,2)
  2856.   call secumita
  2857.   GetMailInfo TO
  2858.   removiene = RESULT
  2859.   parse var removiene '<'nmcadena'>'
  2860.   if nmcadena = '' then nmcadena = removiene
  2861.   removiene = nmcadena
  2862.   LADI = removiene
  2863.   address command('echo >>YAM:YamNet.dat "0 'rehoy' 'word(sujeto,1)' 'word(sujeto,2)' 'elsecuta' 'CRC32(TEMP'YamNet/'word(sujeto,2))' 'LADI'"')
  2864.   Call Delete(ILFIC)
  2865.   Address command('delete >NIL: 'TEMP'YamConv ALL QUIET FORCE')
  2866.   Address command('delete >NIL: 'TEMP'YamNet ALL QUIET FORCE')
  2867.   call textos('+' , word(sujeto,2)||' almacenado en 'OUTBO'YamNet.' , word(sujeto,2)||' stored in 'OUTBO'YamNet')
  2868.   borros = 1
  2869.  end
  2870.  
  2871.  if nuevo = 0
  2872.  then do
  2873.   Call Textos('x' , 'Fallo al decodificar mensaje!' , 'Error decoding message')
  2874.  end
  2875.  
  2876. RETURN
  2877.  
  2878. FALLITO:
  2879.  
  2880.   Call Textos('#' , 'Fallo en decodificacion. Pidiendo Re-Envio!' , 'Decoding Error. Requesting a Re-Sending')
  2881.   mopa = 0
  2882.   al = 0
  2883.   do until mopa = 1
  2884.    nomb = right('00'al,2)
  2885.    al = al + 1
  2886.    if ~exists(TEMP'YamNet.CHECK'nomb) then mopa = 1
  2887.   end
  2888.   Address Command('copy 'fichero' 'TEMP'YamNet.CHECK'nomb)
  2889.   if safe = 0
  2890.   then do
  2891.    Call Delete(fichero)
  2892.    Call Delete(autenfichero)
  2893.    If exists(TEMP'YamConv') then Address command('Delete >NIL: 'TEMP'YamConv ALL QUIET NOREQ FORCE')
  2894.    If exists(TEMP'YamConFI') then Address command('Delete >NIL: 'TEMP'YamConFI ALL QUIET NOREQ FORCE')
  2895.    If exists(TEMP'YamNet') then Address command('Delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE')
  2896.    borros = 1
  2897.   end
  2898.   if safe ~= 0
  2899.   then do
  2900.    Call IniSafe
  2901.    Address Command('echo >>'TEMP'YamNet.SAFE "delete 'fichero'"')
  2902.    Address Command('echo >>'TEMP'YamNet.SAFE "delete 'autenfichero'"')
  2903.    Address Command('echo >>'TEMP'YamNet.SAFE "Delete >NIL: 'TEMP'YamNet ALL QUIET NOREQ FORCE"')
  2904.    Address Command('echo >>'TEMP'YamNet.SAFE "Delete >NIL: 'TEMP'YamConv ALL QUIET NOREQ FORCE"')
  2905.    Address Command('echo >>'TEMP'YamNet.SAFE "Delete >NIL: 'TEMP'YamConFI ALL QUIET NOREQ FORCE"')
  2906.   end
  2907.   Call Textos('%' , 'Guarda el fichero ['TEMP'YamNet.CHECK'nomb'] para comparar' , 'Save the file ['TEMP'YamNet.CHECK'nomb'] to compare')
  2908.   call HazResendReq
  2909.  
  2910. RETURN
  2911.  
  2912. HALT:
  2913. say '*** BREAK'
  2914. CALL SALIR
  2915. BREAK_C:
  2916. say '*** BREAK'
  2917. CALL SALIR
  2918. BREAK_D:
  2919. say '*** BREAK'
  2920. CALL SALIR
  2921. BREAK_E:
  2922. say '*** BREAK'
  2923. CALL SALIR
  2924. BREAK_F:
  2925. say '*** BREAK'
  2926. CALL SALIR
  2927.  
  2928. SALIR:
  2929.  
  2930. say '** END **'
  2931. Call AnteSalir
  2932. EXIT
  2933.  
  2934. ERROR:
  2935.  riesco = RC
  2936.  riesv = errortext(riesco)
  2937.  Say 'RC V = ['riesv']'
  2938. EXIT
  2939.  
  2940. SYNTAX:
  2941.  riesco = RC
  2942.  riesv = errortext(riesco)
  2943.  Call Textos('*' , 'EL YAM no esta inicializado. Esperando un poco mas' , 'YAM not initialized, yet. Waiting a little more')
  2944.  Call Delay(250)
  2945.  if ELYAM = 'Tareauno'
  2946.  then do
  2947.   Call Tareauno
  2948.   Call TRASTUNO
  2949.   EXIT
  2950.  end
  2951.  If ELYAM = 'Tareados'
  2952.  then do
  2953.   Call Tareados
  2954.   Call TRASTDOS
  2955.   EXIT
  2956.  end
  2957.  If ELYAM = 'Infierno'
  2958.  then do
  2959.   Call Infierno
  2960.   Call SIGUINFER
  2961.   EXIT
  2962.  end
  2963.  If ELYAM = 'Observin'
  2964.  then do
  2965.   Call Observin
  2966.   Call TRASOBSER
  2967.   EXIT
  2968.  end
  2969.  If ELYAM = 'Escribello'
  2970.  then do
  2971.   Call Escribello
  2972.   if remiralo = 'flo' then Call trasflo
  2973.   if remiralo = 'hlo' then Call trashlo
  2974.   if remiralo = 'clo' then Call trasclo
  2975.   if remiralo = 'dlo' then Call trasdlo
  2976.   if remiralo = 'slo' then Call traslo
  2977.   Say 'Bad programed.. Sorry!'
  2978.   EXIT
  2979.  end
  2980.  if ELYAM = 'Yacheche'
  2981.  then do
  2982.   call Yacheche
  2983.   EXIT
  2984.  end
  2985.  if ELYAM = 'Yachecho'
  2986.  then do
  2987.   call Yachecho
  2988.   EXIT
  2989.  end
  2990.  Say 'RC V = ['riesv']'
  2991. EXIT
  2992.  
  2993. NOVALUE:
  2994.  
  2995.  Say RESULT
  2996.  Say RC
  2997. EXIT
  2998.